Docker build fixes

This commit is contained in:
Ben Allfree
2022-11-01 21:33:24 -07:00
parent cdec7e1801
commit 32f64c553a
3 changed files with 184 additions and 6 deletions

View File

@@ -14,6 +14,26 @@ services:
- ./mount/cache/go:/go
- ./mount/cache/yarn:/usr/local/share/.cache/yarn/v6
- ..:/src
profiles: ['build']
buildbox:
environment:
- GOPATH=/go
env_file:
- .env.local
build:
context: ..
dockerfile: Dockerfile
container_name: buildbox
working_dir: /src
command: bash -c "yarn build"
volumes:
- ./mount/cache/go:/go
- ./mount/cache/yarn:/usr/local/share/.cache/yarn/v6
- ..:/src
depends_on:
prepbox:
condition: service_completed_successfully
profiles: ['build']
www:
env_file:
- .env.local
@@ -34,8 +54,7 @@ services:
depends_on:
daemon:
condition: service_started
prepbox:
condition: service_completed_successfully
profiles: ['serve']
daemon:
env_file:
- .env.local
@@ -55,9 +74,7 @@ services:
- app-network
ports:
- '9001:3000'
depends_on:
prepbox:
condition: service_completed_successfully
profiles: ['serve']
nginx:
image: nginx:mainline-alpine
container_name: nginx
@@ -74,6 +91,7 @@ services:
- ./mount/nginx/ssl:/mount/nginx/ssl
networks:
- app-network
profiles: ['serve']
networks:
app-network: