Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 54 additions & 72 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,33 @@
#**********************************************************************/
name: device-management-toolkit

services:
services:
console:
restart: always
image: intel/device-mgmt-toolkit-console:latest
build:
context: ./services/console
dockerfile: ./Dockerfile
networks:
- openamtnetwork
env_file:
- .env
environment:
APP_COMMON_NAME: ${MPS_COMMON_NAME}
DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/consoledb
SECRET_ADDR: http://vault:8200
SECRET_TOKEN: ${VAULT_TOKEN}
Comment on lines +18 to +22
HTTP_PORT: "8181"
LOG_LEVEL: info
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8181/api/v1/health"]
interval: 12s
timeout: 12s
retries: 3
ports:
- "8181:8181"
- "${MPSPORT}:4433"

webui:
restart: always
image: intel/oact-webui:latest
Expand All @@ -17,8 +43,7 @@ services:
RPS_SERVER: https://${MPS_COMMON_NAME}/rps
MPS_SERVER: https://${MPS_COMMON_NAME}/mps
VAULT_SERVER: https://${MPS_COMMON_NAME}/vault
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf

rps:
restart: always
image: intel/oact-rps:latest
Expand All @@ -30,71 +55,44 @@ services:
env_file:
- .env
healthcheck:
interval: 12s
interval: 12s
timeout: 12s
retries: 3
retries: 3
test: ["CMD", "node", "rps/dist/Healthcheck.js"]
environment:
RPS_MPS_SERVER: http://mps:3000
environment:
RPS_MPS_SERVER: http://console:8181
RPS_SECRETS_PATH: ${SECRETS_PATH}
RPS_VAULT_TOKEN: ${VAULT_TOKEN}
Comment on lines 61 to 65
RPS_VAULT_ADDRESS: ${VAULT_ADDRESS}
RPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/rpsdb
RPS_CONSUL_ENABLED: ${CONSUL_ENABLED}
RPS_CONSUL_HOST: ${CONSUL_HOST}
RPS_CONSUL_PORT: ${CONSUL_PORT}
mps:
restart: always
image: intel/oact-mps:latest
networks:
- openamtnetwork
build:
context: ./mps
dockerfile: ./Dockerfile
ports:
- "${MPSPORT}:4433"
env_file:
- .env
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "node", "mps/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
MPS_CONSUL_ENABLED: ${CONSUL_ENABLED}
MPS_CONSUL_HOST: ${CONSUL_HOST}
MPS_CONSUL_PORT: ${CONSUL_PORT}
volumes:
- private-volume:/mps-microservice/private

mpsrouter:
restart: always
image: intel/oact-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: ./services/mps-router
dockerfile: ./Dockerfile
networks:
- openamtnetwork
environment:
MPS_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/consoledb?sslmode=disable
PORT: ${PORT}
MPS_PORT: ${MPSWEBPORT}
healthcheck:
interval: 12s
timeout: 12s
retries: 3
test: ["CMD", "/app", "--health"]

db:
restart: always
image: postgres:18
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
healthcheck:
Expand All @@ -110,37 +108,20 @@ services:
- 5432:5432
volumes:
- ./data:/docker-entrypoint-initdb.d

vault:
restart: always
image: hashicorp/vault:1.21
networks:
- openamtnetwork
ports:
ports:
- 8200:8200
environment:
environment:
VAULT_DEV_ROOT_TOKEN_ID: ${VAULT_TOKEN}
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
cap_add:
- IPC_LOCK
consul:
restart: always
image: hashicorp/consul
networks:
- openamtnetwork
ports:
- 8500:8500
profiles:
- consul
volumes:
- type: volume
source: consul-config
target: /consul/config
volume: {}
- type: volume
source: consul-data
target: /consul/data
volume: {}
command: "agent -server -ui -node=OACT-1 -bootstrap-expect=1 -client=0.0.0.0"

kong:
restart: always
image: kong:3.9
Expand Down Expand Up @@ -173,22 +154,23 @@ services:
ports:
- 443:8443
- 8001:8001

mosquitto:
restart: always
image: eclipse-mosquitto
ports:
- 8883:8883
volumes:
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
networks:
- openamtnetwork
profiles:
- "mqtt"

volumes:
app-volume:
private-volume:
consul-config:
consul-data:
networks:
app-volume:
private-volume:
Comment on lines 170 to +172

networks:
openamtnetwork:
driver: "bridge"
Loading