Remote frontend nginx now forwards API requests to Django so login and registration work when the host proxy only routes to port 8080. Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
986 B
YAML
38 lines
986 B
YAML
services:
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile.prod
|
|
args:
|
|
VITE_DATA_MODE: ${VITE_DATA_MODE:-local}
|
|
container_name: sg_frontend
|
|
ports:
|
|
- "${FRONTEND_BIND:-127.0.0.1}:${FRONTEND_PORT:-8080}:80"
|
|
restart: unless-stopped
|
|
depends_on:
|
|
backend:
|
|
condition: service_started
|
|
required: false
|
|
|
|
backend:
|
|
profiles: ["with-backend"]
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.prod
|
|
container_name: sg_backend
|
|
environment:
|
|
DJANGO_SETTINGS_MODULE: config.settings
|
|
SECRET_KEY: ${DJANGO_SECRET_KEY:-change-me-in-production}
|
|
DEBUG: "False"
|
|
ALLOWED_HOSTS: ${ALLOWED_HOSTS:-localhost,127.0.0.1}
|
|
USE_JWT_AUTH: ${USE_JWT_AUTH:-false}
|
|
DATABASE_PATH: /app/data/db.sqlite3
|
|
volumes:
|
|
- sqlite_data:/app/data
|
|
ports:
|
|
- "${BACKEND_BIND:-127.0.0.1}:${BACKEND_PORT:-8000}:8000"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
sqlite_data:
|