-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
44 lines (44 loc) · 1.13 KB
/
compose.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
version: "3.9"
services:
bot:
build: .
volumes:
- ./config.toml:/usr/src/tabby/config.toml
- ./launch.py:/usr/src/tabby/launch.py
- ./tabby:/usr/src/tabby/tabby
ports:
- 8080:8080
secrets:
- postgres-password
- discord-bot-token
- discord-client-id
- discord-client-secret
restart: unless-stopped
depends_on:
- db
db:
image: postgres:15-bullseye
environment:
- POSTGRES_USER=tabby
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres-password
# The database is used by the Discord bot and needs to be reachable.
expose:
- 5432
volumes:
- ./tabby/schema.sql:/docker-entrypoint-initdb.d/tabby-schema.sql
- tabby-postgres-data:/var/lib/postgresql/data
secrets:
- postgres-password
restart: unless-stopped
volumes:
tabby-postgres-data:
external: true
secrets:
postgres-password:
environment: TABBY_POSTGRES_PASSWORD
discord-bot-token:
environment: TABBY_DISCORD_BOT_TOKEN
discord-client-id:
environment: TABBY_DISCORD_CLIENT_ID
discord-client-secret:
environment: TABBY_DISCORD_CLIENT_SECRET