Container refactoring

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
James Pattinson
2026-04-26 09:43:02 +00:00
parent 0c0b5fbefe
commit 74a4e3ede8
9 changed files with 259 additions and 109 deletions
+53 -28
View File
@@ -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: