65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: buchhaltung-db
|
|
environment:
|
|
POSTGRES_DB: buchhaltung
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- buchhaltung-net
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build: ./backend
|
|
container_name: buchhaltung-backend
|
|
ports:
|
|
- "3001:3001"
|
|
environment:
|
|
DB_HOST: db
|
|
DB_PORT: 5432
|
|
DB_NAME: buchhaltung
|
|
DB_USER: postgres
|
|
DB_PASSWORD: postgres
|
|
PORT: 3001
|
|
NODE_ENV: production
|
|
JWT_SECRET: change-this-secret-in-production-min-32-chars
|
|
volumes:
|
|
- ./backend/uploads:/app/uploads
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- buchhaltung-net
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
image: nginx:alpine
|
|
container_name: buchhaltung-frontend
|
|
ports:
|
|
- "3000:80"
|
|
volumes:
|
|
- ./frontend/dist:/usr/share/nginx/html:ro
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- buchhaltung-net
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
buchhaltung-net:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data: |