-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (81 loc) · 2.31 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
version: "3"
# Please note that, this container-compose is only for test latest image built
# from development branch and prod image built from released version.
services:
db:
image: "mariadb:11.4.2"
volumes:
- "nitrate_db_data:/var/lib/mysql"
restart: always
environment:
MYSQL_DATABASE: nitrate
MYSQL_ROOT_PASSWORD: nitrate
command: >-
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
healthcheck:
test: mysqladmin ping -uroot -pnitrate
interval: 5s
timeout: 2s
retries: 3
start_period: 5s
messagebus:
image: rabbitmq:3.13.4-alpine
restart: always
environment:
RABBITMQ_DEFAULT_VHOST: myvhost
healthcheck:
test: rabbitmq-diagnostic -q ping
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
worker:
depends_on:
- messagebus
restart: always
image: "${NS:-quay.io/nitrate}/worker:${VERSION:-develop}"
volumes:
- "./compose/custom_settings.py:/project/nitrate-config/nitrate_custom_conf.py:Z"
environment:
NITRATE_DB_ENGINE: mysql
NITRATE_DB_HOST: db
NITRATE_DB_PORT: 3306
NITRATE_DB_NAME: nitrate
NITRATE_DB_USER: root
NITRATE_SECRET_KEY: do-not-use-this-key-for-worker-production
web:
depends_on:
- db
- messagebus
restart: always
image: "${NS:-quay.io/nitrate}/web:${VERSION:-develop}"
ports:
- "8001:8080"
volumes:
- "./compose/custom_settings.py:/project/nitrate-config/nitrate_custom_conf.py:Z"
- "nitrate_uploads:/code/uploads:Z"
- "nitrate_httpd_logs:/var/log/httpd:Z"
environment:
NITRATE_DB_ENGINE: mysql
NITRATE_DB_HOST: db
NITRATE_DB_PORT: 3306
NITRATE_DB_NAME: nitrate
NITRATE_DB_USER: root
NITRATE_SECRET_KEY: do-not-use-this-key-for-production
NITRATE_MIGRATE_DB: 1
NITRATE_SET_DEFAULT_PERMS: 1
NITRATE_SUPERUSER_USERNAME: admin
NITRATE_SUPERUSER_PASSWORD: admin
NITRATE_SUPERUSER_EMAIL: [email protected]
healthcheck:
test: curl -L http://127.0.0.1:8080 | grep "<title>Nitrate</title>"
interval: 5s
timeout: 2s
retries: 3
start_period: 5s
# Run `docker inspect web` to see volume directory on host.
volumes:
nitrate_db_data:
nitrate_uploads:
nitrate_httpd_logs: