forked from jamesp/sasa-membership
+53
-28
@@ -42,8 +42,8 @@ services:
|
||||
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES}
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
ports:
|
||||
- "6000:8000" # Only expose backend API to host
|
||||
expose:
|
||||
- "8000"
|
||||
volumes:
|
||||
- ./backend/app:/app/app
|
||||
- ./backend/alembic:/app/alembic
|
||||
@@ -55,35 +55,60 @@ services:
|
||||
# mysql:
|
||||
# condition: service_healthy
|
||||
|
||||
# frontend:
|
||||
# build:
|
||||
# context: ./frontend
|
||||
# dockerfile: Dockerfile
|
||||
# target: development
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# - VITE_HOST_CHECK=false
|
||||
# - VITE_ALLOWED_HOSTS=${VITE_ALLOWED_HOSTS}
|
||||
# ports:
|
||||
# - "8050:3000" # Expose frontend to host
|
||||
# volumes:
|
||||
# - ./frontend/src:/app/src
|
||||
# - ./frontend/public:/app/public
|
||||
# - ./frontend/vite.config.ts:/app/vite.config.ts
|
||||
# depends_on:
|
||||
# - backend
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
target: development
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- VITE_ALLOWED_HOSTS=${VITE_ALLOWED_HOSTS}
|
||||
expose:
|
||||
- "3000"
|
||||
volumes:
|
||||
- ./frontend/src:/app/src
|
||||
- ./frontend/public:/app/public
|
||||
- ./frontend/vite.config.ts:/app/vite.config.ts
|
||||
- ./frontend/index.html:/app/index.html
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
gateway:
|
||||
build:
|
||||
context: ./docker/gateway
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DEV_CERT_CN=${DEV_CERT_CN:-localhost}
|
||||
- DEV_CERT_SANS=${DEV_CERT_SANS:-DNS:localhost,IP:127.0.0.1,IP:::1}
|
||||
ports:
|
||||
- "${APP_PORT:-8050}:80"
|
||||
- "${APP_TLS_PORT:-8443}:443"
|
||||
volumes:
|
||||
- ./docker/gateway/nginx.dev.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- gateway_certs:/etc/nginx/certs
|
||||
depends_on:
|
||||
- backend
|
||||
- frontend
|
||||
|
||||
frontend-prod:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
target: production
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8050:80" # Nginx default port
|
||||
depends_on:
|
||||
- backend
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
target: production
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${APP_PORT:-8050}:80" # Nginx default port
|
||||
depends_on:
|
||||
- backend
|
||||
profiles:
|
||||
- prod
|
||||
|
||||
volumes:
|
||||
# mysql_data:
|
||||
uploads_data:
|
||||
gateway_certs:
|
||||
|
||||
Reference in New Issue
Block a user