-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
195 lines (179 loc) · 7.19 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# The .env file sets ENVVARS for the Docker CLI used by this compose file.
---
version: "3"
services:
cms:
image: ${CMS_IMAGE}:${CMS_TAG}
volumes:
- ./conf/cms/settings_local.py:/code/taccsite_cms/settings_local.py
- ./conf/uwsgi/uwsgi_cms.ini:/code/uwsgi.ini
- /var/www/portal/cms/static:/code/static
- /var/www/portal/cms/media:/code/media
command: ["uwsgi", "--ini", "uwsgi.ini"]
container_name: core_portal_cms
depends_on:
- postgrescms
redis:
image: redis:5.0
volumes:
- core_portal_redis_data:/data
container_name: core_portal_redis
rabbitmq:
image: rabbitmq:3.7.17-management
volumes:
- core_portal_rabbitmq_data:/var/lib/rabbitmq/mnesia/rabbit@core_portal_rabbitmq
env_file: ./conf/rabbitmq/rabbitmq.env
container_name: core_portal_rabbitmq
memcached:
image: memcached:latest
command: ["-m", "1024m"]
container_name: core_portal_memcached
restart: always
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
ulimits:
memlock: -1
environment:
- ES_HEAP_SIZE:1g
- discovery.type=single-node
volumes:
- ./conf/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- core_portal_es_data:/usr/share/elasticsearch/data
container_name: core_portal_elasticsearch
ports:
- 127.0.0.1:9200:9200
postgres:
image: postgres:11.5
volumes:
- core_portal_postgres_data:/var/lib/postgresql/data/portal
container_name: core_portal_postgres
environment:
- POSTGRES_PASSWORD=dev
- POSTGRES_USER=dev
- POSTGRES_DB=dev
- PGDATA=/var/lib/postgresql/data/portal
postgrescms:
image: postgres:11.5
volumes:
- core_cms_postgres_data:/var/lib/postgresql/data/portal
container_name: core_cms_postgres
environment:
- POSTGRES_PASSWORD=taccforever
- POSTGRES_USER=postgresadmin
- POSTGRES_DB=taccsite
- PGDATA=/var/lib/postgresql/data/portal
nginx:
image: nginx
volumes:
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./conf/nginx/protx.location.conf:/etc/nginx/conf.d/protx.location.conf
- ./conf/nginx/data.location.conf:/etc/nginx/conf.d/data.location.conf
- ./conf/nginx/assets.location.conf:/etc/nginx/conf.d/assets.location.conf
- ./conf/uwsgi/uwsgi_params:/etc/nginx/uwsgi_params
- ./conf/certificates/dhparam.pem:/etc/ssl/dhparam.pem
- ./conf/certificates/cep.test.crt:/etc/ssl/certs/portal.cer
- ./conf/certificates/cep.test.key/:/etc/ssl/private/portal.key
- /var/www/portal/cms/static:/var/www/portal/cms/static
- /var/www/portal/cms/media:/var/www/portal/cms/media
- /var/www/portal/portal/media:/var/www/portal/portal/media
- /var/www/portal/portal/static:/var/www/portal/portal/static
- protx_geospatial_data:/protx-data/static
- ./protx-client:/var/www/portal/protx-client
- protx_app_distribution:/protx-app-distribution
ports:
- 127.0.0.1:80:80
- 127.0.0.1:443:443
container_name: core_portal_nginx
websockets:
image: ${PORTAL_IMAGE}:${PORTAL_TAG}
volumes:
- ./conf/certificates/cep.test.crt:/etc/ssl/certs/portal.cer
- ./conf/certificates/cep.test.key/:/etc/ssl/private/portal.key
- ./conf/portal/settings_secret.py:/srv/www/portal/server/portal/settings/settings_secret.py
- ./conf/portal/settings_custom.py:/srv/www/portal/server/portal/settings/settings_custom.py
container_name: core_portal_websockets
# ** NOTE: Run this daphne command below to run a production-ready daphne server,
# ** matching deployed configurations. Be aware there is no autoreload for local
# ** development with this enabled.
# command: 'daphne -b 0.0.0.0 -p 9000 -e ssl:443:privateKey=/etc/ssl/private/portal.key:certKey=/etc/ssl/certs/portal.cer --root-path=/srv/www/portal/server --access-log - --proxy-headers portal.asgi:application'
command: 'python manage.py runserver 0.0.0.0:9000'
core:
image: ${PORTAL_IMAGE}:${PORTAL_TAG}
volumes:
- ./conf/portal/settings_secret.py:/srv/www/portal/server/portal/settings/settings_secret.py
- ./conf/portal/settings_custom.py:/srv/www/portal/server/portal/settings/settings_custom.py
- /var/www/portal/portal/media:/srv/www/portal/server/media
- /var/www/portal/portal/static:/srv/www/portal/server/static
# uwsgi is not working in a development environment as containers
# are making non-secure (i.e. http) requests to other containers
# - ./conf/uwsgi/uwsgi_core.ini:/srv/www/portal/server/conf/uwsgi/uwsgi_core.ini
dns:
- 8.8.8.8
- 8.8.4.4
stdin_open: true
tty: true
# uwsgi is not working in a development environment as containers
# are making non-secure (i.e. http) requests to other containers
#command: uwsgi --ini /srv/www/portal/server/conf/uwsgi/uwsgi_core.ini
command: python manage.py runserver --noasgi 0.0.0.0:6000
container_name: core_portal_django
workers:
image: ${PORTAL_IMAGE}:${PORTAL_TAG}
volumes:
- ./conf/portal/settings_secret.py:/srv/www/portal/server/portal/settings/settings_secret.py
- ./conf/portal/settings_custom.py:/srv/www/portal/server/portal/settings/settings_custom.py
command: "celery -A portal worker -Q default,indexing,files,api,onboard --concurrency=10"
container_name: core_portal_workers
protx:
# image: ${PROTX_DASHBOARD_IMAGE}:${PROTX_DASHBOARD_TAG} # Uncomment this line to use an image defined in .env file. (1/4)
# Comment out the build block if using an image. (2/4)
build:
context: .
dockerfile: ./Dockerfile
volumes:
- ~/protx-data:/protx-data
- ./protx:/app/protx # Comment out this line if using an image (3/4).
dns:
- 8.8.8.8
- 8.8.4.4
environment:
- PROTX_COOKS_DATABASE=${PROTX_COOKS_DATABASE}
- PROTX_ANALYTICS_DATABASE=${PROTX_ANALYTICS_DATABASE}
- PROTX_RESOURCES_DATABASE=${PROTX_RESOURCES_DATABASE}
- FLASK_APP=/app/protx/app.py
- FLASK_ENV=development
- USE_DEV_CLIENT=true # if false, use the pre-built-container client. set to false if using an image (4/4)
stdin_open: true
tty: true
container_name: protx
hostname: protx
command: "gunicorn -w 4 -b 0.0.0.0:8000 protx.app:app -k gevent --reload --timeout 300"
restart: always
protx_geospatial:
image: taccwma/protx-geospatial:${PROTX_GEOSPATIAL_TAG}
pull_policy: always
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
container_name: protx_geospatial
protx_setup_client_app_volume:
image: ${PROTX_DASHBOARD_IMAGE}:${PROTX_DASHBOARD_TAG}
pull_policy: always
volumes:
- protx_app_distribution:/app_dist
command: cp -rf /app/protx-client/dist/. /app_dist
protx_geospatial_setup_volumes:
image: taccwma/protx-geospatial:${PROTX_GEOSPATIAL_TAG}
pull_policy: always
volumes:
- protx_geospatial_data:/geospatial_data
command: cp -ru /data/. /geospatial_data
volumes:
core_portal_redis_data:
core_portal_es_data:
core_portal_rabbitmq_data:
core_portal_postgres_data:
core_cms_postgres_data:
protx_geospatial_data:
protx_app_distribution: