60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:15
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_DB: ${DB_NAME:-nexus}
|
|
POSTGRES_USER: ${DB_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
volumes:
|
|
- ./backend:/app
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-config.settings.development}
|
|
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
|
|
- DEV_SECRET_KEY=${DEV_SECRET_KEY}
|
|
- DB_NAME=${DB_NAME:-nexus}
|
|
- DB_USER=${DB_USER:-postgres}
|
|
- DB_PASSWORD=${DB_PASSWORD:-postgres}
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- REDIS_URL=redis://redis:6379/1
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
command: python manage.py runserver 0.0.0.0:8000
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
ports:
|
|
- "5173:5173"
|
|
environment:
|
|
- PUBLIC_GRAPHQL_URL=${PUBLIC_GRAPHQL_URL:-http://localhost:8000/graphql/}
|
|
depends_on:
|
|
- backend
|
|
command: npm run dev -- --host
|
|
|
|
volumes:
|
|
postgres_data:
|