-
Notifications
You must be signed in to change notification settings - Fork 161
/
docker-compose.yml
118 lines (109 loc) · 2.56 KB
/
docker-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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
x-common-env-vars:
- &postgres-db
POSTGRES_DB=ballsdex
- &postgres-user
POSTGRES_USER=ballsdex
- &postgres-url
"BALLSDEXBOT_DB_URL=postgres://ballsdex:${POSTGRES_PASSWORD}@postgres:5432/ballsdex"
services:
bot:
restart: "no"
image: ballsdex
build: .
environment:
- *postgres-url
depends_on:
- postgres-db
# ports:
# - "15260:15260"
networks:
- internal
volumes:
- type: bind
source: ./
target: /code
tty: true
command: poetry run python3 -m ballsdex --dev
admin-panel:
image: ballsdex
ports:
- "8000:8000"
networks:
- internal
environment:
- *postgres-url
- "BALLSDEXBOT_REDIS_URL=redis://redis"
depends_on:
- postgres-db
- redis-cache
volumes:
- type: bind
source: ./
target: /code
tty: true
command: poetry run uvicorn ballsdex.core.admin:_app --host 0.0.0.0
postgres-db:
image: postgres
restart: always
hostname: postgres
environment:
- *postgres-db
- *postgres-user
- POSTGRES_PASSWORD
# WARNING: before exposing ports, change the default db password in the .env file!
# ports:
# - "5432:5432"
networks:
- internal
volumes: # Persist the db data
- database-data:/var/lib/postgresql/data
postgres-backup:
image: prodrigestivill/postgres-backup-local
restart: always
user: postgres:postgres
volumes:
- ./pgbackups:/backups
depends_on:
- postgres-db
networks:
- internal
environment:
- *postgres-db
- *postgres-user
- POSTGRES_PASSWORD
- POSTGRES_HOST=postgres
- SCHEDULE=@daily
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
- HEALTHCHECK_PORT=3928
redis-cache:
image: redis:latest
restart: always
hostname: redis
# ports:
# - "6379:6379"
networks:
- internal
environment:
- ALLOW_EMPTY_PASSWORD=yes
command: redis-server --save 20 1 --loglevel warning
volumes:
- cache-data:/data
# Uncomment to enable gateway proxy feature and
# add "gateway-url: ws://gateway_proxy:5421" to your config.yaml
# Also change tag corresponding to your platform if not x86-64
#
# gateway-proxy:
# container_name: gateway_proxy
# image: ghcr.io/martinebot/gateway-proxy:x86-64
# restart: always
# volumes:
# - ./gatewayproxy/config.json:/config.json
# networks:
# - internal
volumes:
database-data:
cache-data:
networks:
internal: