forked from open-amt-cloud-toolkit/open-amt-cloud-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
162 lines (162 loc) · 4.24 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
#/*********************************************************************
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
version: '3.3'
services:
webui:
image: ${WEBUI_IMAGE}
networks:
- openamtnetwork
build:
context: ./sample-web-ui
dockerfile: ./Dockerfile
environment:
RPS_SERVER: https://${MPS_COMMON_NAME}/rps
MPS_SERVER: https://${MPS_COMMON_NAME}/mps
VAULT_SERVER: https://${MPS_COMMON_NAME}/vault
volumes:
- ./sample-web-ui/nginx.conf:/etc/nginx/conf.d/default.conf
rps:
image: ${RPS_IMAGE}
networks:
- openamtnetwork
build:
context: ./rps
dockerfile: ./Dockerfile
env_file:
- .env
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "node", "dist/Healthcheck.js"]
environment:
RPS_MPS_SERVER: http://mps:3000
RPS_SECRETS_PATH: ${SECRETS_PATH}
RPS_VAULT_TOKEN: ${VAULT_TOKEN}
RPS_VAULT_ADDRESS: ${VAULT_ADDRESS}
RPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/rpsdb?sslmode=no-verify
mps:
image: ${MPS_IMAGE}
networks:
- openamtnetwork
build:
context: ./mps
dockerfile: ./Dockerfile
restart: always
ports:
- "${MPSPORT}:4433"
env_file:
- .env
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "node", "dist/Healthcheck.js"]
environment:
MPS_INSTANCE_NAME: '{{.Task.Name}}'
MPS_SECRETS_PATH: ${SECRETS_PATH}
MPS_VAULT_TOKEN: ${VAULT_TOKEN}
MPS_VAULT_ADDRESS: ${VAULT_ADDRESS}
MPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/mpsdb?sslmode=no-verify
volumes:
- private-volume:/mps-microservice/private
mpsrouter:
image: mpsrouter:latest
environment:
MPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/mpsdb?sslmode=disable
PORT: ${PORT}
MPS_PORT: ${MPSWEBPORT}
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "/app","--health"]
build:
context: ./mps-router
dockerfile: ./Dockerfile
networks:
- openamtnetwork
db:
image: sslpostgres
build:
context: ./pg
dockerfile: ./Dockerfile
command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
networks:
- openamtnetwork
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rpsdb"]
interval: 2s
timeout: 3s
retries: 30
environment:
POSTGRES_DB: rpsdb
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- ./data:/docker-entrypoint-initdb.d
vault:
image: "vault"
networks:
- openamtnetwork
ports:
- "8200:8200"
environment:
VAULT_DEV_ROOT_TOKEN_ID: ${VAULT_TOKEN}
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
cap_add:
- IPC_LOCK
kong:
image: kong:2.3
healthcheck:
test:
- CMD
- nc
- -z
- localhost
- "8443"
retries: 10
command:
- "kong"
- "start"
- "--vv"
environment:
- KONG_DATABASE=off
- KONG_CASSANDRA_CONTACT_POINTS=kong-database
- KONG_ADMIN_LISTEN=0.0.0.0:8001
- KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444
- KONG_NGINX_DAEMON=off
- KONG_DECLARATIVE_CONFIG=/home/kong/kong.yml
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_DNS_ORDER=LAST,A,CNAME
- KONG_UPSTREAM_KEEPALIVE_POOL_SIZE=0
networks:
- openamtnetwork
volumes:
- ./kong.yaml:/home/kong/kong.yml
ports:
- "443:8443"
- "8001:8001"
restart: always
mosquitto:
image: eclipse-mosquitto
ports:
- "8883:8883"
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
networks:
- openamtnetwork
volumes:
app-volume:
private-volume:
networks:
openamtnetwork:
driver: "bridge"