53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
services:
|
|
# --- FRONTEND (SSR) ---
|
|
bizmatch-ssr:
|
|
build:
|
|
context: .
|
|
dockerfile: bizmatch/Dockerfile
|
|
container_name: bizmatch-ssr
|
|
restart: unless-stopped
|
|
# In der Produktion brauchen wir keine Ports nach außen (Caddy regelt das intern)
|
|
networks:
|
|
- bizmatch
|
|
volumes:
|
|
- ./bizmatch-server/pictures:/app/pictures
|
|
environment:
|
|
NODE_ENV: production
|
|
# WICHTIG: Die URL, unter der das SSR-Frontend die API intern erreicht
|
|
API_INTERNAL_URL: http://bizmatch-app:3001
|
|
|
|
# --- BACKEND ---
|
|
app:
|
|
build:
|
|
context: ./bizmatch-server
|
|
dockerfile: Dockerfile
|
|
container_name: bizmatch-app
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./bizmatch-server/.env
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- bizmatch
|
|
volumes:
|
|
# Das Backend braucht ebenfalls Zugriff auf den Bilder-Ordner zum Speichern!
|
|
- ./bizmatch-server/pictures:/app/dist/pictures
|
|
|
|
# --- DATABASE ---
|
|
postgres:
|
|
container_name: bizmatchdb
|
|
image: postgres:17-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- bizmatch-db-data:/var/lib/postgresql/data
|
|
env_file:
|
|
- ./bizmatch-server/.env
|
|
networks:
|
|
- bizmatch
|
|
|
|
volumes:
|
|
bizmatch-db-data:
|
|
|
|
networks:
|
|
bizmatch:
|
|
external: true # Wir nutzen das gleiche Netzwerk wie für Caddy |