Nye-TeeOff/docker-compose.yml

78 lines
2.2 KiB
YAML
Raw Normal View History

2026-02-26 09:20:51 +01:00
services:
db:
image: postgis/postgis:15-3.4
container_name: teeoff_db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
2026-02-26 09:20:51 +01:00
ports:
- "5433:5432"
volumes:
- teeoff_db_data:/var/lib/postgresql/data
restart: unless-stopped
api:
build: ./backend
container_name: teeoff_api
environment:
DATABASE_URL: ${DATABASE_URL}
JWT_SECRET: ${JWT_SECRET}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
PUBLIC_BASE_URL: ${PUBLIC_BASE_URL}
PUBLIC_SESSION_SECRET: ${PUBLIC_SESSION_SECRET}
PUBLIC_COMMENT_DEFAULT_STATUS: ${PUBLIC_COMMENT_DEFAULT_STATUS}
SMTP_SERVER: ${SMTP_SERVER}
SMTP_PORT: ${SMTP_PORT}
SMTP_USER: ${SMTP_USER}
SMTP_PASS: ${SMTP_PASS}
PUBLIC_FROM_EMAIL: ${PUBLIC_FROM_EMAIL}
PUBLIC_MAGIC_LINK_MAX_AGE_MINUTES: ${PUBLIC_MAGIC_LINK_MAX_AGE_MINUTES}
2026-04-18 09:00:16 +02:00
INDEXNOW_KEY: ${INDEXNOW_KEY}
2026-02-26 09:20:51 +01:00
ports:
- "8001:8000"
volumes:
- ./backend:/app
- ./frontend/src/content:/shared/frontend-content:ro
2026-03-05 05:18:03 +01:00
# Denne linjen sørger for at bilder lagres direkte i frontendens public-mappe:
- ./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
environment:
DATABASE_URL: ${DATABASE_URL}
GEMINI_API_KEY: ${GEMINI_API_KEY}
SMTP_SERVER: ${SMTP_SERVER}
SMTP_PORT: ${SMTP_PORT}
SMTP_USER: ${SMTP_USER}
SMTP_PASS: ${SMTP_PASS}
EMAIL_TO: ${EMAIL_TO}
2026-04-10 18:37:33 +02:00
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
2026-04-13 13:18:25 +02:00
command: npm start
2026-02-26 09:20:51 +01:00
ports:
- "3000:3000"
2026-04-13 15:29:43 +02:00
volumes:
- ./frontend/public/uploads:/app/public/uploads
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: