-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
73 lines (65 loc) · 1.72 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: "2"
services:
mariadb:
container_name: "${PROJECT_NAME}_mariadb"
image: mariadb:latest
command: --max_allowed_packet=67108864
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: $MYSQL_DATABASE
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
volumes:
- mariadb:/var/lib/mysql
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.
- ./mariadb/dump:/home/mariadb/dump
- ./mariadb/init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
# ports:
# - "3306:3306"
matomo:
container_name: "${PROJECT_NAME}_matomo"
image: matomo:fpm
links:
- mariadb
volumes:
- ./matomo/config:/var/www/html/config
- ./matomo/logs:/var/www/html/logs
- plugins:/varwww/html/plugins
- ./matomo/plugins:/var/www/html/plugins
nginx:
container_name: "${PROJECT_NAME}_nginx"
build: ./nginx
command: "/bin/sh -c 'while :; do /etc/nginx/ssl/certbot.sh -v; sleep 24h & wait $${!}; done & nginx'"
environment:
EMAIL: $PROJECT_EMAIL
DOMAINS: $PROJECT_DOMAINS
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- letsencrypt:/etc/letsencrypt
- certbot:/var/www/certbot
links:
- matomo
volumes_from:
- matomo
ports:
- "80:80"
- "443:443"
redis:
container_name: "${PROJECT_NAME}_redis"
image: redis:latest
# ports:
# - "6379:6379"
volumes:
mariadb:
driver: local
plugins:
driver: local
driver_opts:
type: none
device: ${PWD}/matomo/plugins
o: bind
letsencrypt:
driver: local
certbot:
driver: local