From 6b3a089fc4fba1d8cd5b4341053da6dbe14183ea Mon Sep 17 00:00:00 2001 From: Manuel Imperiale Date: Sat, 5 Oct 2024 19:35:20 -0300 Subject: [PATCH] NOISSUE - Add donwlinks section to docker-compose (#533) Signed-off-by: Manuel Imperiale --- docker/.env | 17 +++++++++++++++++ docker/docker-compose.yml | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/docker/.env b/docker/.env index 0ec02a49d..57df0a141 100644 --- a/docker/.env +++ b/docker/.env @@ -345,4 +345,21 @@ MF_WEBHOOKS_DB_PASS=mainflux MF_WEBHOOKS_DB=webhooks ### Downlinks +MF_DOWNLINKS_LOG_LEVEL=debug MF_DOWNLINKS_HTTP_PORT=9025 +MF_DOWNLINKS_SERVER_CERT="" +MF_DOWNLINKS_SERVER_KEY="" +MF_JAEGER_URL="jaeger:6831" +MF_THINGS_AUTH_GRPC_TIMEOUT=1s +MF_DOWNLINKS_CA_CERTS="" +MF_DOWNLINKS_CLIENT_TLS=false +MF_DOWNLINKS_DB_PORT=5432 +MF_DOWNLINKS_DB_USER=mainflux +MF_DOWNLINKS_DB_PASS=mainflux +MF_DOWNLINKS_DB=downlinks +MF_AUTH_GRPC_PORT=8181 +MF_AUTH_GRPC_URL=auth:8181 +MF_AUTH_GRPC_TIMEOUT=1s +MF_THINGS_AUTH_GRPC_PORT=8183 +MF_THINGS_AUTH_GRPC_URL=things:8183 +MF_BROKER_URL=nats://broker:4222 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index eba447ed7..029c62675 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -21,6 +21,7 @@ volumes: mainfluxlabs-webhooks-db-volume: mainfluxlabs-smtp-notifier-db-volume: mainfluxlabs-smpp-notifier-db-volume: + mainfluxlabs-downlinks-db-volume: services: ui: @@ -570,3 +571,42 @@ services: - mainfluxlabs-base-net volumes: - ./templates/${MF_SMTP_NOTIFIER_TEMPLATE}:/${MF_EMAIL_TEMPLATE} + + downlinks-db: + image: postgres:13.3-alpine + container_name: mainfluxlabs-downlinks-db + restart: on-failure + environment: + POSTGRES_USER: ${MF_DOWNLINKS_DB_USER} + POSTGRES_PASSWORD: ${MF_DOWNLINKS_DB_PASS} + POSTGRES_DB: ${MF_DOWNLINKS_DB} + networks: + - mainfluxlabs-base-net + volumes: + - mainfluxlabs-downlinks-db-volume:/var/lib/postgresql/data + + downlinks: + image: ${MF_RELEASE_PREFIX}/downlinks:${MF_RELEASE_TAG} + container_name: mainfluxlabs-downlinks + depends_on: + - downlinks-db + - things + restart: on-failure + environment: + MF_DOWNLINKS_LOG_LEVEL: ${MF_DOWNLINKS_LOG_LEVEL} + MF_DOWNLINKS_HTTP_PORT: ${MF_DOWNLINKS_HTTP_PORT} + MF_BROKER_URL: ${MF_BROKER_URL} + MF_JAEGER_URL: ${MF_JAEGER_URL} + MF_DOWNLINKS_DB_HOST: downlinks-db + MF_DOWNLINKS_DB_PORT: ${MF_DOWNLINKS_DB_PORT} + MF_DOWNLINKS_DB_USER: ${MF_DOWNLINKS_DB_USER} + MF_DOWNLINKS_DB_PASS: ${MF_DOWNLINKS_DB_PASS} + MF_DOWNLINKS_DB: ${MF_DOWNLINKS_DB} + MF_DOWNLINKS_SERVER_CERT: ${MF_DOWNLINKS_SERVER_CERT} + MF_DOWNLINKS_SERVER_KEY: ${MF_DOWNLINKS_SERVER_KEY} + MF_THINGS_AUTH_GRPC_URL: ${MF_THINGS_AUTH_GRPC_URL} + MF_THINGS_AUTH_GRPC_TIMEOUT: ${MF_THINGS_AUTH_GRPC_TIMEOUT} + ports: + - ${MF_DOWNLINKS_HTTP_PORT}:${MF_DOWNLINKS_HTTP_PORT} + networks: + - mainfluxlabs-base-net