-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
176 lines (159 loc) · 5.3 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
version: '3.4'
x-shared-app-environment:
&shared-app-environment
LOKOLE_QUEUE_BROKER_SCHEME: ${LOKOLE_QUEUE_BROKER_SCHEME}
LOKOLE_EMAIL_SERVER_QUEUES_SAS_NAME: ${LOKOLE_EMAIL_SERVER_QUEUES_SAS_NAME}
LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY: ${LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY}
LOKOLE_EMAIL_SERVER_QUEUES_NAMESPACE: ${LOKOLE_EMAIL_SERVER_QUEUES_NAMESPACE}
LOKOLE_LOG_LEVEL: ${LOKOLE_LOG_LEVEL}
LOKOLE_EMAIL_SERVER_APPINSIGHTS_KEY: ${APPINSIGHTS_INSTRUMENTATIONKEY}
LOKOLE_EMAIL_SERVER_APPINSIGHTS_HOST: http://appinsights:8000
LOKOLE_RESOURCE_SUFFIX: ${LOKOLE_RESOURCE_SUFFIX}
LOKOLE_STORAGE_PROVIDER: AZURE_BLOBS
LOKOLE_EMAIL_SERVER_AZURE_BLOBS_NAME: ${AZURITE_ACCOUNT}
LOKOLE_EMAIL_SERVER_AZURE_BLOBS_KEY: ${AZURITE_KEY}
LOKOLE_EMAIL_SERVER_AZURE_BLOBS_HOST: ${AZURITE_HOST}
LOKOLE_EMAIL_SERVER_AZURE_BLOBS_SECURE: ${AZURITE_SECURE}
LOKOLE_EMAIL_SERVER_AZURE_TABLES_NAME: ${AZURITE_ACCOUNT}
LOKOLE_EMAIL_SERVER_AZURE_TABLES_KEY: ${AZURITE_KEY}
LOKOLE_EMAIL_SERVER_AZURE_TABLES_HOST: ${AZURITE_HOST}
LOKOLE_EMAIL_SERVER_AZURE_TABLES_SECURE: ${AZURITE_SECURE}
LOKOLE_CLIENT_AZURE_STORAGE_NAME: ${AZURITE_ACCOUNT}
LOKOLE_CLIENT_AZURE_STORAGE_KEY: ${AZURITE_KEY}
LOKOLE_CLIENT_AZURE_STORAGE_HOST: ${AZURITE_HOST}
LOKOLE_CLIENT_AZURE_STORAGE_SECURE: ${AZURITE_SECURE}
PYTHONDONTWRITEBYTECODE: "1"
LOKOLE_RANDOM_SEED: "42"
x-shared-app-build:
&shared-app-build
image: ${DOCKER_REPO}/opwenserver_app:${BUILD_TAG}
build:
context: .
dockerfile: docker/app/Dockerfile
target: ${BUILD_TARGET}
services:
nginx:
image: ${DOCKER_REPO}/opwenserver_nginx:${BUILD_TAG}
build:
context: .
dockerfile: docker/nginx/Dockerfile
ports:
- ${APP_PORT}:8888
environment:
NGINX_WORKERS: ${NGINX_WORKERS}
DNS_RESOLVER: 127.0.0.11
HOSTNAME_WEBAPP: webapp:8080
HOSTNAME_CLIENT_METRICS: api:8080
HOSTNAME_CLIENT_READ: api:8080
HOSTNAME_CLIENT_WRITE: api:8080
HOSTNAME_EMAIL_RECEIVE: api:8080
HOSTNAME_CLIENT_REGISTER: api:8080
depends_on:
- api
- webapp
statuspage:
image: ${DOCKER_REPO}/opwenstatuspage:${BUILD_TAG}
build:
context: .
dockerfile: docker/statuspage/Dockerfile
target: ${BUILD_TARGET}
ports:
- ${STATUSPAGE_PORT}:3000
command: ["npm", "start"]
environment:
PORT: 3000
CHOKIDAR_USEPOLLING: "true"
depends_on:
- nginx
webapp:
image: ${DOCKER_REPO}/opwenwebapp:${BUILD_TAG}
build:
context: .
dockerfile: docker/client/Dockerfile
target: ${BUILD_TARGET}
args:
VERSION: ${BUILD_TAG}
command: ["/app/docker/client/run-gunicorn.sh"]
environment:
<<: *shared-app-environment
WEBAPP_WORKERS: ${WEBAPP_WORKERS}
WEBAPP_PORT: "8080"
HOST: "0.0.0.0"
depends_on:
- azurite
api:
<<: *shared-app-build
command: ["/app/docker/app/run-gunicorn.sh"]
environment:
<<: *shared-app-environment
PORT: "8080"
CONNEXION_SPEC: dir:/app/opwen_email_server/swagger
SERVER_WORKERS: ${SERVER_WORKERS}
TESTING_UI: "True"
LOKOLE_REGISTRATION_USERNAME: admin
LOKOLE_REGISTRATION_PASSWORD: password
depends_on:
- appinsights
- azurite
worker:
<<: *shared-app-build
command: ["/app/docker/app/run-celery.sh"]
environment:
<<: *shared-app-environment
CELERY_QUEUE_NAMES: all
QUEUE_WORKERS: ${QUEUE_WORKERS}
depends_on:
- appinsights
- azurite
- rabbitmq
client:
image: ${DOCKER_REPO}/opwenwebapp:${BUILD_TAG}
build:
context: .
dockerfile: docker/client/Dockerfile
target: ${BUILD_TARGET}
args:
VERSION: ${BUILD_TAG}
ports:
- ${CLIENT_PORT}:5000
command: ["/app/docker/client/run-lokole.sh"]
environment:
PYTHONDONTWRITEBYTECODE: "1"
LOKOLE_LOG_LEVEL: ${LOKOLE_LOG_LEVEL}
WEBAPP_WORKERS: ${WEBAPP_WORKERS}
QUEUE_WORKERS: ${QUEUE_WORKERS}
WEBAPP_PORT: "5000"
HOST: "0.0.0.0"
OPWEN_SETTINGS: /app/docker/client/client.env
OPWEN_EMAIL_SERVER_ENDPOINT: http://nginx:8888
OPWEN_REMOTE_RESOURCE_CONTAINER: compressedpackages
OPWEN_REMOTE_ACCOUNT_NAME: ${AZURITE_ACCOUNT}
OPWEN_REMOTE_ACCOUNT_KEY: ${AZURITE_KEY}
OPWEN_REMOTE_ACCOUNT_HOST: ${AZURITE_HOST}
OPWEN_REMOTE_ACCOUNT_SECURE: ${AZURITE_SECURE}
OPWEN_CLIENT_NAME: developer1
OPWEN_CLIENT_ID: bdd640fb-0667-1ad1-1c80-317fa3b1799d
LOKOLE_ADMIN_NAME: admin
LOKOLE_ADMIN_PASSWORD: lokole1Admin
rabbitmq:
image: rabbitmq:management-alpine
environment:
RABBITMQ_DEFAULT_USER: ${LOKOLE_EMAIL_SERVER_QUEUES_SAS_NAME}
RABBITMQ_DEFAULT_PASS: ${LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY}
ports:
- ${RABBITMQ_PORT}:15672
appinsights:
image: cwolff/appinsights-on-premises:0.2.0-libcloud
depends_on:
- azurite
environment:
PORT: "8000"
DATABASE_URL: "libcloud://${AZURITE_ACCOUNT}:${AZURITE_KEY}@azure_blobs?endpoint=${AZURITE_HOST}&ssl=${AZURITE_SECURE}"
APPINSIGHTS_INSTRUMENTATIONKEY: "${APPINSIGHTS_INSTRUMENTATIONKEY}"
azurite:
image: mcr.microsoft.com/azure-storage/azurite:latest
command: ["azurite-blob", "--blobHost=0.0.0.0"]
environment:
AZURITE_ACCOUNTS: "${AZURITE_ACCOUNT}:${AZURITE_KEY};"
ports:
- ${AZURITE_PORT}:10000