-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
88 lines (85 loc) · 1.86 KB
/
compose.yaml
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
86
87
88
services:
waifu:
build:
dockerfile: Dockerfile
depends_on:
meta:
condition: service_healthy
db:
condition: service_healthy
volumes:
- waifu:/home/waifubot
secrets:
- bot.properties
networks:
- metanet
meta:
image: metabase/metabase
depends_on:
db:
condition: service_healthy
volumes:
- metabase:/metabase-data
ports:
- 3000:3000
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase
MB_DB_PORT: 5432
MB_DB_USER_FILE: /run/secrets/db_user.txt
MB_DB_PASS_FILE: /run/secrets/db_pass.txt
MB_DB_HOST: postgres
MB_DB_FILE: /metabase-data/metabase.db
networks:
- metanet
secrets:
- db_pass.txt
- db_user.txt
healthcheck:
test: curl --fail -I http://localhost:3000/api/health || exit 1
interval: 15s
timeout: 5s
retries: 5
db:
image: postgres:latest
container_name: postgres
hostname: postgres
environment:
POSTGRES_USER_FILE: /run/secrets/root_db_user.txt
POSTGRES_DB_FILE: /run/secrets/root_db_user.txt
POSTGRES_PASSWORD_FILE: /run/secrets/root_db_pass.txt
networks:
- metanet
secrets:
- root_db_user.txt
- root_db_pass.txt
ports:
- 5432:5432
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
waifu:
name: waifu_vol
metabase:
name: meta_vol
db:
name: db_vol
networks:
metanet:
driver: bridge
secrets:
bot.properties:
file: run/secrets/bot.properties
root_db_user.txt:
file: run/secrets/root_db_user.txt
root_db_pass.txt:
file: run/secrets/root_db_pass.txt
db_user.txt:
file: run/secrets/db_user.txt
db_pass.txt:
file: run/secrets/db_pass.txt