frontend in docker
This commit is contained in:
@@ -60,6 +60,16 @@ services:
|
||||
retries: 3
|
||||
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:
|
||||
image: nginx:alpine
|
||||
@@ -72,7 +82,10 @@ services:
|
||||
- ../nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ../frontend/dist:/usr/share/nginx/html:ro
|
||||
depends_on:
|
||||
- backend
|
||||
frontend:
|
||||
condition: service_completed_successfully
|
||||
backend:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user