Initial commit
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: shiftplan_db
|
||||
environment:
|
||||
POSTGRES_DB: shiftplan_db
|
||||
POSTGRES_USER: shiftplan_user
|
||||
POSTGRES_PASSWORD: shiftplan_secure_password_123
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U shiftplan_user -d shiftplan_db"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: shiftplan_backend
|
||||
command: >
|
||||
sh -c "python manage.py makemigrations --noinput &&
|
||||
python manage.py migrate --noinput &&
|
||||
python manage.py seed_data &&
|
||||
gunicorn --bind 0.0.0.0:8000 --workers 3 shiftplan_backend.wsgi:application"
|
||||
environment:
|
||||
SECRET_KEY: "prod-secret-key-change-in-env"
|
||||
DEBUG: "False"
|
||||
ALLOWED_HOSTS: "*"
|
||||
POSTGRES_DB: shiftplan_db
|
||||
POSTGRES_USER: shiftplan_user
|
||||
POSTGRES_PASSWORD: shiftplan_secure_password_123
|
||||
POSTGRES_HOST: db
|
||||
POSTGRES_PORT: "5432"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
restart: unless-stopped
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: shiftplan_frontend
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user