-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml.prod
57 lines (53 loc) · 1.37 KB
/
docker-compose.yml.prod
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
version: "3.9"
services:
reverse-proxy:
container_name: reverse-proxy
image: traefik:latest
command:
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.exposedByDefault=false"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
srec-api:
container_name: srec-api
image: srec-api
build:
context: ./api
labels:
- "traefik.enable=true"
- "traefik.http.routers.srec-api.rule=Host(`localhost`) && PathPrefix(`/api/`)"
- "traefik.http.routers.srec-api.middlewares=srec-api"
- "traefik.http.middlewares.srec-api.stripprefix.prefixes=/api"
- "traefik.http.middlewares.srec-api.stripprefix.forceSlash=false"
expose:
- "8000"
depends_on:
- timescaledb
- reverse-proxy
srec-ui:
container_name: srec-ui
image: srec-ui
build:
context: ./ui
environment:
- BASE_URL=${BASE_URL}
labels:
- "traefik.enable=true"
- "traefik.http.routers.srec-ui.rule=Host(`${HOST}`)"
timescaledb:
container_name: pgres
image: "timescale/timescaledb:latest-pg14"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_NAME}
# volumes:
# - "pg_data:/var/lib/postgresql/data"
volumes:
pg_data: