-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (44 loc) · 1013 Bytes
/
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
version: "3.8"
services:
web:
depends_on:
- redis
- mariadb
build:
context: .
dockerfile: Dockerfile.web
env_file:
- .env
ports:
- "8080:8080"
command: [ "/wait-for-it.sh", "mariadb:3306", "--", "/go/bin/covidbot-web" ]
restart: on-failure
bot:
depends_on:
- redis
- mariadb
build:
context: .
dockerfile: Dockerfile.bot
env_file:
- .env
command: ["/wait-for-it.sh", "mariadb:3306", "--", "/go/bin/covidbot-bot"]
restart: on-failure
redis:
image: "redis:alpine"
restart: on-failure
mariadb:
image: mariadb:10.2
environment:
MYSQL_ROOT_PASSWORD: ''
MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
MYSQL_DATABASE: covid_sim
MYSQL_USER: covid_sim
MYSQL_PASSWORD: password
restart: on-failure
volumes:
- ${PWD}/mariadb:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 15