Compare commits
1 Commits
timo-clean
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| e62263622f |
@@ -1,39 +1,37 @@
|
|||||||
services:
|
services:
|
||||||
# --- FRONTEND ---
|
# --- FRONTEND (SSR) ---
|
||||||
bizmatch-ssr:
|
bizmatch-ssr:
|
||||||
build:
|
build:
|
||||||
context: . # Pfad zum Angular Ordner
|
context: .
|
||||||
dockerfile: bizmatch/Dockerfile
|
dockerfile: bizmatch/Dockerfile
|
||||||
image: bizmatch-ssr
|
|
||||||
container_name: bizmatch-ssr
|
container_name: bizmatch-ssr
|
||||||
extra_hosts:
|
|
||||||
- "localhost:host-gateway"
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
# In der Produktion brauchen wir keine Ports nach außen (Caddy regelt das intern)
|
||||||
- '4200:4000' # Extern 4200 -> Intern 4000 (SSR)
|
networks:
|
||||||
environment:
|
- bizmatch
|
||||||
NODE_ENV: production
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./bizmatch-server/pictures:/app/pictures
|
- ./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 ---
|
# --- BACKEND ---
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: ./bizmatch-server # Pfad zum NestJS Ordner
|
context: ./bizmatch-server
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: bizmatch-server:latest
|
|
||||||
container_name: bizmatch-app
|
container_name: bizmatch-app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- '3001:3001'
|
|
||||||
env_file:
|
env_file:
|
||||||
- ./bizmatch-server/.env # Pfad zur .env Datei
|
- ./bizmatch-server/.env
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- bizmatch
|
- bizmatch
|
||||||
# WICHTIG: Kein Volume Mapping für node_modules im Prod-Modus!
|
volumes:
|
||||||
# Das Image bringt alles fertig mit.
|
# Das Backend braucht ebenfalls Zugriff auf den Bilder-Ordner zum Speichern!
|
||||||
|
- ./bizmatch-server/pictures:/app/dist/pictures
|
||||||
|
|
||||||
# --- DATABASE ---
|
# --- DATABASE ---
|
||||||
postgres:
|
postgres:
|
||||||
@@ -44,19 +42,12 @@ services:
|
|||||||
- bizmatch-db-data:/var/lib/postgresql/data
|
- bizmatch-db-data:/var/lib/postgresql/data
|
||||||
env_file:
|
env_file:
|
||||||
- ./bizmatch-server/.env
|
- ./bizmatch-server/.env
|
||||||
environment:
|
|
||||||
POSTGRES_DB: ${POSTGRES_DB}
|
|
||||||
POSTGRES_USER: ${POSTGRES_USER}
|
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
||||||
ports:
|
|
||||||
- '5434:5432'
|
|
||||||
networks:
|
networks:
|
||||||
- bizmatch
|
- bizmatch
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
bizmatch-db-data:
|
bizmatch-db-data:
|
||||||
driver: local
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
bizmatch:
|
bizmatch:
|
||||||
external: false # Oder true, falls du es manuell erstellt hast
|
external: true # Wir nutzen das gleiche Netzwerk wie für Caddy
|
||||||
Reference in New Issue
Block a user