-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.yml
123 lines (116 loc) · 2.99 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
111
112
113
114
115
116
117
118
119
120
121
122
123
# docker-compose for public n6
# Basic Commands
# docker-compose build
# docker-compose up
# Prepare Auth DB
# docker-compose run --rm worker n6/docker/bin/wait-for-services.sh
# docker-compose run --rm worker n6create_and_initialize_auth_db -D -y
# docker-compose run --rm worker n6populate_auth_db -F -i -t -s -p example.com login@example.com
# On MySQL Changes - restart web cache
# docker-compose exec web apache2ctl restart
# Cleanup
# docker-compose down -v
version: "3.7"
services:
base:
image: n6_base
build:
context: .
dockerfile: docker/base/Dockerfile
worker:
image: n6_worker
build:
context: .
dockerfile: ./docker/worker/Dockerfile
container_name: n6
hostname: n6
command: >
bash -c "n6/docker/bin/wait-for-services.sh
&& supervisord -c supervisord/supervisord.conf"
networks:
- n6-pub-net
web:
image: n6_web
build:
context: .
dockerfile: ./docker/web/Dockerfile
hostname: apache
restart: always
container_name: web
ports:
- "80:80" # redirect permanently to 443
- "443:443" # n6 Portal
- "3001:3001" # n6 Portal GUI configurator
- "4443:4443" # n6 REST API
- "4444:4444" # n6 Admin Panel
volumes:
- ./volume/apache2/logs:/var/log/apache
networks:
- n6-pub-net
rabbit:
image: n6_rabbit
build:
context: .
dockerfile: ./docker/rabbit/Dockerfile
hostname: rabbit
restart: always
container_name: rabbit
environment:
- RABBITMQ_CONFIG_FILE=/volume/rabbitmq/conf/rabbitmq.conf
- RABBITMQ_USER=login@example.com
- RABBITMQ_PASSWORD=n6component
ports:
- 5671:5671 # TLS connections
- 5672:5672 # TCP connections
- 15671:15671 # WEB management
- 15672:15672 # HTTP API
volumes:
- ./etc/ssl/generated_certs:/volume/rabbitmq/certs/:ro
- ./etc/rabbitmq/conf:/volume/rabbitmq/conf/:ro
networks:
- n6-pub-net
mongo:
image: mongo:4.2
hostname: mongo
restart: always
environment:
MONGO_INITDB_DATABASE: n6
container_name: mongo
ports:
- 27017:27017
command: --auth
healthcheck:
test: "if mongo --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'; then exit 0; fi; exit 1;"
interval: 10s
timeout: 5s
retries: 5
start_period: 120s
networks:
- n6-pub-net
volumes:
- ./docker/mongo/docker-healthcheck:/docker-healthcheck
- ./volume/mongo/db:/data/db
- ./etc/mongo/initdb:/docker-entrypoint-initdb.d
mysql:
image: n6_mysql
build:
context: .
dockerfile: ./docker/mysql/Dockerfile
hostname: mysql
restart: always
environment:
- MYSQL_USERNAME=root
- MYSQL_ROOT_PASSWORD=password
container_name: mysql
ports:
- 3306:3306
volumes:
- ./volume/mysql:/var/lib/mysql
- ./etc/mysql/initdb:/docker-entrypoint-initdb.d
networks:
- n6-pub-net
volumes:
n6_logs:
networks:
n6-pub-net:
driver: bridge