-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
92 lines (85 loc) · 2.15 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: '3'
volumes:
apache-lock:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
apache-run:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
tmp:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
networks:
traefik:
external:
name: lucasvanlierop-website_default
services:
app:
image: allihoppa/allihoppa.nl:${DEPLOY_TAG}
user: ${ALLIHOPPA_UID}:${ALLIHOPPA_GID}
env_file:
- ./db.env
- ../default/wordpress.env
- ./wordpress.env
- ./wordpress.secret.env
networks:
default:
traefik:
labels:
- "traefik.enable=true"
- "traefik.backend=allihoppa"
- "traefik.frontend.rule=Host:www.allihoppa.nl,allihoppa.nl"
- "traefik.port=8000"
- "traefik.docker.network=lucasvanlierop-website_default"
read_only: true
volumes:
- apache-lock:/var/lock
- apache-run:/var/run
- /var/www/allihoppa/uploads:/var/www/public/wp-content/uploads
- tmp:/tmp
hostname: www.allihoppa.nl
mysql:
image: allihoppa/mysql:5.7
user: ${ALLIHOPPA_UID}:${ALLIHOPPA_GID}
volumes:
- /var/www/allihoppa/mysql/init/:/docker-entrypoint-initdb.d
- /var/www/allihoppa/mysql/data/:/var/lib/mysql
- /var/www/allihoppa/mysql/backup/:/backup
environment:
MYSQL_DATABASE_HOST: localhost
env_file:
- ./db.env
command: 'mysqld --log-error-verbosity=3'
mysqldump:
image: allihoppa/mysql:5.7
user: ${ALLIHOPPA_UID}:${ALLIHOPPA_GID}
volumes:
- /var/www/allihoppa/mysql/backup/:/backup
env_file:
- ./db.env
environment:
MYSQL_DATABASE_HOST: mysql
command: 'backup'
deploy:
restart_policy:
condition: any
delay: "1h"
remote_backup:
image: that1guy/docker-rclone
user: ${ALLIHOPPA_UID}:${ALLIHOPPA_GID}
env_file:
- ./rclone.env
volumes:
- /var/www/allihoppa/uploads:/data/uploads
- /var/www/allihoppa/mysql/backup:/data/mysql
command: 'rclone -vv copy /data DROPBOX:/Allihoppa.nl/website_backup'
deploy:
restart_policy:
condition: any
delay: "1h"