-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
57 lines (53 loc) · 1.36 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
services:
redis:
image: redis:latest
restart: always
networks:
- backend-network
expose:
- 6379
healthcheck:
test: [ 'CMD', 'redis-cli', '--raw', 'incr', 'ping' ]
interval: 1s
timeout: 3s
retries: 5
start_period: 6s
database:
image: mariadb:10.6
restart: always
expose:
- 3306
networks:
- backend-network
environment:
- MARIADB_USER=${SASSYBOT_DB_USER:-sassybot}
- MARIADB_PASSWORD=${SASSYBOT_DB_PASSWORD:-password}
- MARIADB_DATABASE=${SASSYBOT_DB_NAME:-sassybot}
- MARIADB_ROOT_PASSWORD=${DB_ROOT_PASSWORD:-root}
healthcheck:
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
start_period: 6s
interval: 1s
timeout: 3s
retries: 5
sassybot:
build:
context: .
dockerfile: Dockerfile
restart: always
networks:
- backend-network
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
environment:
- ENV TYPEORM_USERNAME=${SASSYBOT_DB_USER:-sassybot}
- ENV TYPEORM_PASSWORD=${SASSYBOT_DB_PASSWORD:-password}
- ENV TYPEORM_DATABASE=${SASSYBOT_DB_NAME:-sassybot}
- ENV DISCORD_TOKEN=$DISCORD_TOKEN
- ENV XIV_API_TOKEN=$XIV_API_TOKEN
networks:
backend-network:
driver: bridge