-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
95 lines (92 loc) · 2.75 KB
/
docker-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
89
90
91
92
93
94
95
version: "3.8"
x-common: &common
labels:
com.centurylinklabs.watchtower.scope: alphakretin/emcee-tournament-bot
restart: unless-stopped
logging:
driver: "${COMPOSE_LOG_DRIVER}"
services:
postgres:
image: "postgres:${POSTGRES_VERSION}"
user: postgres
environment:
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
ports:
- "${POSTGRES_HOST_PORT}:5432"
volumes:
# Any SQL scripts in this directory are executed on first run
# - ./db/init:/docker-entrypoint-initdb.d
- database:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
<<: *common
adminer:
image: adminer
environment:
ADMINER_DESIGN: "${ADMINER_DESIGN}"
ADMINER_DEFAULT_SERVER: postgres
ports:
- "${ADMINER_HOST_PORT}:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
depends_on:
- postgres
<<: *common
backup:
image: "prodrigestivill/postgres-backup-local:${POSTGRES_VERSION}"
user: postgres
environment:
POSTGRES_HOST: postgres
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
SCHEDULE: "${BACKUP_SCHEDULE}"
BACKUP_KEEP_DAYS: "${BACKUP_KEEP_DAYS}"
BACKUP_KEEP_WEEKS: "${BACKUP_KEEP_WEEKS}"
BACKUP_KEEP_MONTHS: "${BACKUP_KEEP_MONTHS}"
volumes:
- ./backups:/backups
depends_on:
- postgres
<<: *common
bot:
build:
context: .
args:
EMCEE_REVISION: "${EMCEE_REVISION}"
image: "ghcr.io/dawnbrandbots/emcee-tournament-bot:${EMCEE_VERSION:-latest}"
environment:
DISCORD_TOKEN: "${DISCORD_TOKEN}"
OCTOKIT_TOKEN: "${OCTOKIT_TOKEN}"
CHALLONGE_USERNAME: "${CHALLONGE_USERNAME}"
CHALLONGE_TOKEN: "${CHALLONGE_TOKEN}"
EMCEE_DEFAULT_PREFIX: "${EMCEE_DEFAULT_PREFIX}"
EMCEE_DEFAULT_TO_ROLE: "${EMCEE_DEFAULT_TO_ROLE}"
EMCEE_LOGGER_WEBHOOK: "${EMCEE_LOGGER_WEBHOOK}"
POSTGRESQL_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}"
DEBUG: "emcee:*"
volumes:
- ./dbs:/app/dbs
depends_on:
- postgres
<<: *common
watchtower:
image: containrrr/watchtower
environment:
DOCKER_CONFIG: /etc/docker
WATCHTOWER_CLEANUP: 1
WATCHTOWER_POLL_INTERVAL: 30
WATCHTOWER_NOTIFICATIONS: shoutrrr
WATCHTOWER_NOTIFICATION_URL: "${WATCHTOWER_NOTIFICATION_URL}"
WATCHTOWER_SCOPE: alphakretin/emcee-tournament-bot
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "${DOCKER_CONFIG_DIRECTORY}:/etc/docker:ro"
<<: *common
volumes:
database: