docker-compose: build both images from source, bake frontend into nginx, use --build flag
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
context: ../backend
|
||||
dockerfile: ../deploy/Dockerfile
|
||||
container_name: project-tracker-api
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
@@ -14,14 +14,13 @@ services:
|
||||
- project-tracker-net
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
build:
|
||||
context: ../frontend
|
||||
dockerfile: ../deploy/Dockerfile.nginx
|
||||
container_name: project-tracker-nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ../frontend:/usr/share/nginx/html:ro
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user