2026-02-26 09:20:51 +01:00
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: postgis/postgis:15-3.4
|
|
|
|
|
container_name: teeoff_db
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: teeoff_admin
|
|
|
|
|
POSTGRES_PASSWORD: teeoff_secret_password
|
|
|
|
|
POSTGRES_DB: teeoff
|
|
|
|
|
ports:
|
|
|
|
|
- "5433:5432"
|
|
|
|
|
volumes:
|
|
|
|
|
- teeoff_db_data:/var/lib/postgresql/data
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
api:
|
|
|
|
|
build: ./backend
|
|
|
|
|
container_name: teeoff_api
|
|
|
|
|
ports:
|
|
|
|
|
- "8001:8000"
|
2026-02-26 16:32:34 +01:00
|
|
|
volumes:
|
|
|
|
|
- ./backend:/app
|
2026-03-05 05:18:03 +01:00
|
|
|
# Denne linjen sørger for at bilder lagres direkte i frontendens public-mappe:
|
2026-02-26 16:32:34 +01:00
|
|
|
- ./frontend/public/media:/app/public/media
|
2026-02-26 09:20:51 +01:00
|
|
|
depends_on:
|
|
|
|
|
- db
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
2026-04-10 18:37:33 +02:00
|
|
|
worker:
|
|
|
|
|
build: ./backend
|
|
|
|
|
container_name: teeoff_worker
|
|
|
|
|
command: python worker.py
|
|
|
|
|
volumes:
|
|
|
|
|
- ./backend:/app
|
|
|
|
|
depends_on:
|
|
|
|
|
- db
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
2026-02-26 09:20:51 +01:00
|
|
|
frontend:
|
|
|
|
|
build: ./frontend
|
|
|
|
|
container_name: teeoff_frontend
|
2026-03-05 05:18:03 +01:00
|
|
|
# NY LINJE: Tvinger produksjonsmodus for å stoppe WebSocket-feil og relasting
|
|
|
|
|
command: sh -c "npm run build && npm start"
|
2026-02-26 09:20:51 +01:00
|
|
|
ports:
|
|
|
|
|
- "3000:3000"
|
2026-03-05 05:18:03 +01:00
|
|
|
# VIKTIG: Jeg har fjernet "- ./frontend:/app" her for å sikre stabilitet
|
2026-02-26 09:20:51 +01:00
|
|
|
depends_on:
|
|
|
|
|
- api
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
2026-04-10 18:37:33 +02:00
|
|
|
teeoff_db_data:
|