-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
59 lines (54 loc) · 1.47 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
version: "3.1"
services:
web:
image: quay.io/enpcponthe/galeries-web:${TAG-latest}
ports:
- "127.0.0.1:${WEB_PORT}:80"
volumes:
- ./volumes/static:/app/instance/static
- ./volumes/keys:/app/instance/keys
- ./volumes/logs:/app/instance/logs
depends_on:
- db
environment:
- SECRET_KEY=${SECRET_KEY}
- SQLALCHEMY_DATABASE_URI=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@db/${DATABASE_NAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- WEBHOOK_URL=${WEBHOOK_URL}
- TAG=${TAG}
restart: on-failure
backup:
image: candyline/mysql-backup-cron
volumes:
- ./volumes/db-backup:/backup
environment:
- MYSQL_ROOT_PASSWORD=${DATABASE_ROOT_PASSWORD}
- MYSQL_HOST=db
- DBS=${DATABASE_NAME}
- BACKUP_DIR=/backup
- CRON_D_BACKUP="0 1 * * * root /backup.sh | logger"
depends_on:
- db
restart: on-failure
db:
image: mysql:8.0
command: mysqld --default-authentication-plugin=mysql_native_password
volumes:
- db-data:/var/lib/mysql
environment:
- DATA_PATH_HOST=/var/lib/mysql
- MYSQL_ROOT_PASSWORD=${DATABASE_ROOT_PASSWORD}
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
restart: on-failure
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "${PHPMYADMIN_PORT}:80"
depends_on:
- db
restart: on-failure
volumes:
db-data:
driver: local