-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.example.yml
74 lines (68 loc) · 1.94 KB
/
compose.example.yml
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
# this is broken bc frontend can't access backend
services:
traefik:
image: traefik:v3.2
container_name: traefik
command: --api.insecure=true --providers.docker
ports:
- "8000:80" # HTTP
- "8080:8080" # Traefik Dashboard
volumes:
- /run/user/1000/podman/podman.sock:/var/run/docker.sock:z
networks:
- trainstatus-network
backend:
restart: unless-stopped
image: ghcr.io/jonerrr/trainstatus-backend:staging
container_name: backend
environment:
- REDIS_URL=redis://valkey:6379
- DATABASE_URL=postgres://trains:trains@postgres:5432/trains
- ADDRESS=0.0.0.0:3055
- API_KEY=bustime_api_key
depends_on:
- postgres
- valkey
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.services.backend.loadbalancer.server.port=3055"
- "traefik.http.routers.backend.middlewares=strip-api-prefix"
- "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api"
frontend:
restart: unless-stopped
image: ghcr.io/jonerrr/trainstatus-frontend:staging
container_name: frontend
networks:
- trainstatus-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`localhost`)"
- "traefik.http.services.frontend.loadbalancer.server.port=3000"
postgres:
image: postgres:alpine
restart: unless-stopped
container_name: postgres
ports:
- 5432:5432
environment:
- POSTGRES_USER=trains
- POSTGRES_PASSWORD=trains
- POSTGRES_DB=trains
volumes:
- postgres-trainstatus:/var/lib/postgresql/data:z
networks:
- trainstatus-network
valkey:
image: valkey/valkey:alpine
container_name: valkey
restart: unless-stopped
ports:
- 6379:6379
networks:
- trainstatus-network
volumes:
postgres-trainstatus:
networks:
trainstatus-network:
driver: bridge