-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
72 lines (72 loc) · 1.8 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
version: "3.8"
services:
db:
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "3306:3306"
volumes:
- ./database/data:/var/lib/mysql
- ./database/conf.d:/etc/mysql/conf.d
- ./database/conf.d/my.cnf:/etc/mysql/my.cnf
stop_grace_period: 1m
app:
container_name: nostify_bot
build:
context: "./"
dockerfile: "./bot/Dockerfile"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
links:
- subscriber
volumes:
- "./bot/:/var/bot/"
- "./common/:/var/bot/common"
tty: true
command: python bot.py
depends_on:
- db
restart: always
subscriber:
container_name: subscriber
build:
context: "./"
dockerfile: "./subscriber/Dockerfile"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- "./subscriber:/var/subscriber/"
- "./common/:/var/subscriber/common"
tty: true
working_dir: /var/subscriber/src
command: bash -c "cargo run"
ports:
- "5001:5000"
depends_on:
- db
restart: always
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_ARBITRARY=1
- PMA_HOSTS=db
- PMA_USER=root
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
restart: always
ports:
- 8080:80
depends_on:
- db
volumes:
- ./phpmyadmin/phpmyadmin-misc.ini:/usr/local/etc/php/conf.d/phpmyadmin-misc.ini