65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: shiftplan_db_dev
|
|
environment:
|
|
POSTGRES_DB: shiftplan_db_dev
|
|
POSTGRES_USER: shiftplan_user
|
|
POSTGRES_PASSWORD: shiftplan_dev_password_123
|
|
volumes:
|
|
- postgres_dev_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U shiftplan_user -d shiftplan_db_dev"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: shiftplan_backend_dev
|
|
command: >
|
|
sh -c "python manage.py makemigrations --noinput &&
|
|
python manage.py migrate --noinput &&
|
|
python manage.py seed_data &&
|
|
python manage.py runserver 0.0.0.0:8000"
|
|
environment:
|
|
SECRET_KEY: "dev-secret-key-shiftplan"
|
|
DEBUG: "True"
|
|
ALLOWED_HOSTS: "*"
|
|
POSTGRES_DB: shiftplan_db_dev
|
|
POSTGRES_USER: shiftplan_user
|
|
POSTGRES_PASSWORD: shiftplan_dev_password_123
|
|
POSTGRES_HOST: db
|
|
POSTGRES_PORT: "5432"
|
|
volumes:
|
|
- ./backend:/app
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8000:8000"
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
image: node:20-alpine
|
|
container_name: shiftplan_frontend_dev
|
|
working_dir: /app
|
|
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 3000"
|
|
volumes:
|
|
- ./frontend:/app
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_dev_data:
|