-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (75 loc) · 4.06 KB
/
docker-compose.yml
File metadata and controls
85 lines (75 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
services:
frontend:
image: simonapi-frontend:latest
container_name: simonapi-frontend
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.simonapi-frontend-compress.compress=true"
# ── hub.abler.tirol frontend ──────────────────────────────────────────
- "traefik.http.routers.hub-frontend.tls=true"
- "traefik.http.routers.hub-frontend.tls.certresolver=letsEncrypt"
- "traefik.http.routers.hub-frontend.entrypoints=websecure"
- "traefik.http.routers.hub-frontend.rule=Host(`hub.abler.tirol`) && PathPrefix(`/`)"
- "traefik.http.routers.hub-frontend.priority=10"
- "traefik.http.routers.hub-frontend.middlewares=simonapi-frontend-compress"
- "traefik.http.routers.hub-frontend.service=simonapi-frontend-svc"
# ── api.abler.tirol frontend ──────────────────────────────────────────
- "traefik.http.routers.api-frontend.tls=true"
- "traefik.http.routers.api-frontend.tls.certresolver=letsEncrypt"
- "traefik.http.routers.api-frontend.entrypoints=websecure"
- "traefik.http.routers.api-frontend.rule=Host(`api.abler.tirol`) && PathPrefix(`/`)"
- "traefik.http.routers.api-frontend.priority=10"
- "traefik.http.routers.api-frontend.middlewares=simonapi-frontend-compress"
- "traefik.http.routers.api-frontend.service=simonapi-frontend-svc"
# ── shared service ────────────────────────────────────────────────────
- "traefik.http.services.simonapi-frontend-svc.loadbalancer.server.port=80"
backend:
image: simonapi-backend:latest
container_name: simonapi-backend
restart: unless-stopped
volumes:
- ./.env:/app/.env # must contain IP_HASH_SECRET=<openssl rand -hex 32>
- /home/simon/simonapi/data:/data
environment:
- DATA_DIR=/data/signpacks
labels:
- "traefik.enable=true"
# ── hub.abler.tirol backend ───────────────────────────────────────────
- "traefik.http.routers.hub-backend.tls=true"
- "traefik.http.routers.hub-backend.tls.certresolver=letsEncrypt"
- "traefik.http.routers.hub-backend.entrypoints=websecure"
- "traefik.http.routers.hub-backend.rule=Host(`hub.abler.tirol`) && (PathPrefix(`/api`) || PathPrefix(`/fonts`))"
- "traefik.http.routers.hub-backend.priority=100"
- "traefik.http.routers.hub-backend.service=simonapi-backend-svc"
# ── api.abler.tirol backend ───────────────────────────────────────────
- "traefik.http.routers.api-backend.tls=true"
- "traefik.http.routers.api-backend.tls.certresolver=letsEncrypt"
- "traefik.http.routers.api-backend.entrypoints=websecure"
- "traefik.http.routers.api-backend.rule=Host(`api.abler.tirol`) && (PathPrefix(`/api`) || PathPrefix(`/fonts`))"
- "traefik.http.routers.api-backend.priority=100"
- "traefik.http.routers.api-backend.service=simonapi-backend-svc"
# ── shared service ────────────────────────────────────────────────────
- "traefik.http.services.simonapi-backend-svc.loadbalancer.server.port=3000"
# depends_on:
# - postgres
networks:
- postgresql
# postgres:
# image: postgres:17.5-alpine
# env_file:
# - ./conf/postgres/.env
# volumes:
# - ../postgres:/var/lib/postgresql/data
# healthcheck:
# test: ['CMD-SHELL', 'pg_isready -U user -d simonapi']
# interval: 10s
# timeout: 10s
# retries: 5
# restart: unless-stopped
# networks:
# - postgresql
networks:
postgresql:
name: NET_POSTGRESQL
external: true