-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
117 lines (109 loc) · 2.56 KB
/
compose.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
services:
apache:
container_name: apache
build:
context: apache
volumes:
- ${WWW_DIRECTORY}:/var/www/ips
- ${LOGS_DIRECTORY}/apache:/usr/local/apache2/logs
- ${CERTBOT_WWW_DIRECTORY}:/var/www/certbot:ro
- certificates:/etc/letsencrypt:ro
- ${BACKUP_DIRECTORY}/www:/var/backup
environment:
DOMAIN_NAME: ${DOMAIN_NAME}
TZ: ${TIMEZONE}
ports:
- "80:80"
- "443:443"
depends_on:
- php
restart: unless-stopped
php:
container_name: php
build:
context: php
volumes:
- ${WWW_DIRECTORY}:/var/www/ips
- ${LOGS_DIRECTORY}/php:/usr/local/var/log
environment:
TZ: ${TIMEZONE}
depends_on:
- mariadb
- redis
restart: unless-stopped
mariadb:
container_name: mariadb
build:
context: mariadb
volumes:
- database:/var/lib/mysql
- ${LOGS_DIRECTORY}/mariadb:/var/log/mysql
- ${BACKUP_DIRECTORY}/db:/var/backup
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_DATABASE: ${MARIADB_DATABASE}
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
TZ: ${TIMEZONE}
restart: unless-stopped
redis:
container_name: redis
build:
context: redis
volumes:
- ${LOGS_DIRECTORY}/redis:/var/log/redis
environment:
TZ: ${TIMEZONE}
restart: unless-stopped
cron:
container_name: cron
build:
context: cron
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${LOGS_DIRECTORY}/cron:/var/log
environment:
TZ: ${TIMEZONE}
depends_on:
- apache
- php
- mariadb
- restic
restart: unless-stopped
logrotate:
container_name: logrotate
build:
context: logrotate
volumes:
- ${LOGS_DIRECTORY}:/var/log
environment:
TZ: ${TIMEZONE}
certbot:
container_name: certbot
build:
context: certbot
volumes:
- ${CERTBOT_WWW_DIRECTORY}:/var/www/certbot
- certificates:/etc/letsencrypt
environment:
DOMAIN_NAME: ${DOMAIN_NAME}
TZ: ${TIMEZONE}
depends_on:
- apache
restart: unless-stopped
restic:
container_name: restic
build:
context: restic
volumes:
- ${BACKUP_DIRECTORY}:/var/backup
environment:
RESTIC_REPOSITORY: ${RESTIC_REPOSITORY}
RESTIC_PASSWORD: ${RESTIC_PASSWORD}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
TZ: ${TIMEZONE}
restart: unless-stopped
volumes:
database:
certificates: