-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.example.yml
73 lines (69 loc) · 1.42 KB
/
docker-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
version: "3.8"
networks:
ergo-node:
external: true
# Explicit default network to avoid potential conflicts in podman
# TODO: test this
default:
name: ergo-watch
services:
# Postgresql database
db:
build:
context: ./db
shm_size: 1g
environment:
POSTGRES_DB: ergo
POSTGRES_USER: ergo
env_file:
# Defines POSTGRES_PASSWORD
- ./db/db.secret
volumes:
- /var/lib/ergowatch_pg/14/data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5434:5432"
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# Watcher
watcher:
build:
context: ./watcher
environment:
EW_LOG: INFO
volumes:
- ./watcher/docker.toml:/ew/config.toml:ro
links:
- "db"
networks:
- default
- ergo-node
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# API server
api:
build:
context: ./api
environment:
POSTGRES_HOST: db
POSTGRES_DB: ergo
POSTGRES_USER: ergo
# If serving the api behind a reverse proxy with a prefix, set the prefix here
FASTAPI_ROOT_PATH: ""
env_file:
# Defines POSTGRES_PASSWORD
- ./db/db.secret
links:
- "db"
ports:
- "127.0.0.1:8001:80"
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"