-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (62 loc) · 1.32 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
version: '3.8'
services:
mysql:
image: mysql:8.0.29
container_name: mysql
command: mysqld --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
ports:
- "7654:3306"
volumes:
- ../data/mysql/:/var/lib/mysql/
- ../data/backup:/backup
mysql-cron-backup:
image: 'fradelg/mysql-cron-backup'
depends_on:
- mysql
volumes:
- ../data/backup:/backup
environment:
MYSQL_HOST: mysql
MYSQL_USER: root
MYSQL_PASS: ${MYSQL_ROOT_PASSWORD}
MAX_BACKUPS: 60
INIT_BACKUP: 1
# Every day at 03:00
CRON_TIME: 0 3 * * *
# Make it small
GZIP_LEVEL: 9
restart: unless-stopped
api:
build: ./api/
command: Rscript /sysndd_api_volume/start_sysndd_api.R
restart: always
volumes:
- ./api/:/sysndd_api_volume/
ports:
- "7777-7787:7777"
environment:
PASSWORD: ${PASSWORD}
SMTP_PASSWORD: ${SMTP_PASSWORD}
API_CONFIG: ${API_CONFIG}
alb:
image: 'dockercloud/haproxy:1.6.7'
links:
- api
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
app:
build: ./app/
container_name: sysndd_app
restart: always
ports:
- "80:80"
- "443:443"
volumes:
sysndd_api_volume: