This repository was archived by the owner on Mar 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (104 loc) · 2.79 KB
/
docker-compose.yml
File metadata and controls
106 lines (104 loc) · 2.79 KB
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
---
# modified from:
# https://github.com/matomo-org/docker/blob/dc52ce5b12b7cee74e9afa26ee73af07c26e6012/.examples/nginx/docker-compose.yml
version: '3.2'
volumes:
db:
matomo:
services:
db:
image: quay.io/wikipedialibrary/mariadb:10
command: --max-allowed-packet=64MB
restart: always
volumes:
- type: volume
source: db
target: /var/lib/mysql
environment:
- MYSQL_DATABASE=matomo
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
- MYSQL_USER_FILE=/run/secrets/MATOMO_DATABASE_USERNAME
- MYSQL_PASSWORD_FILE=/run/secrets/MATOMO_DATABASE_PASSWORD
secrets:
- MYSQL_ROOT_PASSWORD
- MATOMO_DATABASE_USERNAME
- MATOMO_DATABASE_PASSWORD
app:
image: quay.io/wikipedialibrary/matomo:fpm-alpine
command: matomo.sh
restart: always
volumes:
- type: volume
source: matomo
target: /var/www/html
- type: bind
source: ./logs
target: /var/www/html/logs
- type: bind
source: ./bin/secrets.sh
target: /secrets.sh
read_only: true
- type: bind
source: ./bin/entrypoint.sh
target: /entrypoint.sh
read_only: true
- type: bind
source: ./app/bin
target: /opt/app/bin
read_only: true
environment:
- PATH=/opt/app/bin:$PATH
- MATOMO_DATABASE_HOST=db
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- MATOMO_DATABASE_DBNAME=matomo
secrets:
- MATOMO_DATABASE_USERNAME
- MATOMO_DATABASE_PASSWORD
web:
image: quay.io/wikipedialibrary/nginx:latest
restart: always
volumes:
- type: volume
source: matomo
target: /var/www/html
read_only: true
# see https://github.com/matomo-org/matomo-nginx
- type: bind
source: ./web/conf/nginx.conf
target: /etc/nginx/conf.d/default.conf
read_only: true
ports:
- 80:80
cron:
image: quay.io/wikipedialibrary/matomo:fpm-alpine
command: cron.sh
restart: always
volumes:
- type: volume
source: matomo
target: /var/www/html
- type: bind
source: ./logs
target: /var/www/html/logs
- type: bind
source: ./bin/secrets.sh
target: /secrets.sh
read_only: true
- type: bind
source: ./bin/entrypoint.sh
target: /entrypoint.sh
read_only: true
- type: bind
source: ./cron/bin
target: /opt/cron/bin
read_only: true
environment:
- PATH=/opt/cron/bin:$PATH
- MATOMO_DATABASE_HOST=db
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- MATOMO_DATABASE_DBNAME=matomo
secrets:
- MATOMO_DATABASE_USERNAME
- MATOMO_DATABASE_PASSWORD