docker-compose: build both images from source, bake frontend into nginx, use --build flag

This commit is contained in:
Ada
2026-04-06 09:41:20 -04:00
parent 49aa8adce4
commit a077bffb08
4 changed files with 16 additions and 16 deletions

View File

@@ -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: