57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
services:
|
|
backend:
|
|
image: golang:1.24
|
|
working_dir: /backend
|
|
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
- DATABASE_URL=${DATABASE_URL}
|
|
- ODH_LICENCE_KEY=${ODH_LICENCE_KEY}
|
|
- TZ=Europe/Berlin
|
|
volumes:
|
|
- ./backend:/backend
|
|
command: go run cmd/server/main.go
|
|
restart: unless-stopped
|
|
db:
|
|
image: postgres:14
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
# ports:
|
|
# - "5432:5432"
|
|
volumes:
|
|
- ./pgdata:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
working_dir: /app
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
- DATABASE_URL=${DATABASE_URL}
|
|
volumes:
|
|
- ./frontend:/app
|
|
- ./backend/public/storage:/app/public/storage
|
|
command: sh -c "composer install --no-interaction && php -S 0.0.0.0:8000 -t public"
|
|
restart: unless-stopped
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=traefik-docker_default"
|
|
- "traefik.http.routers.vindn.rule=Host(`${VIRTUAL_HOST}`) || Host(`www.${VIRTUAL_HOST}`)"
|
|
- "traefik.http.routers.vindn.entrypoints=websecure"
|
|
- "traefik.http.routers.vindn.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.vindn.loadbalancer.server.port=8000"
|
|
- "traefik.http.routers.vindn.tls=true"
|
|
- "traefik.http.routers.vindn.middlewares=www-redirect-reverse_vindn"
|
|
- "traefik.http.middlewares.www-redirect-reverse_vindn.redirectregex.permanent=true"
|
|
- "traefik.http.middlewares.www-redirect-reverse_vindn.redirectregex.regex=^http[|s]://${VIRTUAL_HOST}/(.*)"
|
|
- "traefik.http.middlewares.www-redirect-reverse_vindn.redirectregex.replacement=https://www.${VIRTUAL_HOST}/$${1}"
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
name: traefik-docker_default
|