frontend in docker
This commit is contained in:
@@ -60,6 +60,16 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
|
# Frontend build service
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: ../frontend
|
||||||
|
dockerfile: ../docker/Dockerfile.frontend
|
||||||
|
volumes:
|
||||||
|
- ../frontend/dist:/app/dist
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
# Nginx for serving frontend (optional - can also serve via FastAPI)
|
# Nginx for serving frontend (optional - can also serve via FastAPI)
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
@@ -72,7 +82,10 @@ services:
|
|||||||
- ../nginx.conf:/etc/nginx/nginx.conf:ro
|
- ../nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
- ../frontend/dist:/usr/share/nginx/html:ro
|
- ../frontend/dist:/usr/share/nginx/html:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
frontend:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
backend:
|
||||||
|
condition: service_started
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user