-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathdocker-compose.yml
110 lines (96 loc) · 2.04 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Run Monica with fpm flavor, mariadb, cron, queue, redis, and nginx
#
# You first need to generate the secrets for the encryption key and db password:
# `{ echo -n 'base64:'; openssl rand -base64 32; } | docker secret create app_key -`
# `openssl rand -hex 24 | docker secret create mysql_password -`
#
# You might want to set these variables in you .env file:
#- APP_URL with your domain (https scheme)
#
services:
app: &app
build: ./app
image: monica-app
env_file: .env
environment:
- APP_KEY_FILE=/run/secrets/app_key
- DB_PASSWORD_FILE=/run/secrets/mysql_password
- MEILISEARCH_KEY=ChangeMe_ChangeMe
volumes:
- data:/var/www/html/storage
networks:
- monica
restart: always
depends_on:
- db
- redis
- memcached
- meilisearch
secrets:
- app_key
- mysql_password
db:
image: mariadb:11
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_DATABASE=monica
- MYSQL_USER=monica
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
volumes:
- mysqldata:/var/lib/mysql
networks:
- monica
restart: always
secrets:
- mysql_password
redis:
image: redis:alpine
restart: always
networks:
- monica
cron:
<<: *app
command: cron.sh
queue:
<<: *app
command: queue.sh
memcached:
image: memcached:alpine
networks:
- monica
meilisearch:
image: getmeili/meilisearch:latest
environment:
- MEILI_MASTER_KEY=ChangeMe_ChangeMe
- MEILISEARCH_NO_ANALYTICS=true
volumes:
- meili_data:/meili_data
networks:
- monica
web:
build: ./web
image: monica-web
restart: always
ports:
- 80:80
volumes:
- data:/var/www/html/storage:ro
networks:
- monica
depends_on:
- app
networks:
monica:
driver: overlay
volumes:
data:
driver: local
mysqldata:
driver: local
meili_data:
driver: local
secrets:
app_key:
external: true
mysql_password:
external: true