diff --git a/docker/.env b/docker/.env index 57df0a141..923030abf 100644 --- a/docker/.env +++ b/docker/.env @@ -361,5 +361,9 @@ 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 + +# Converters +MF_CONVERTERS_LOG_LEVEL=debug +MF_CONVERTERS_CLIENT_TLS=false +MF_CONVERTERS_CA_CERTS="" +MF_CONVERTERS_PORT=8195 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 029c62675..1456b674b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -456,6 +456,7 @@ services: image: ${MF_RELEASE_PREFIX}/filestore:${MF_RELEASE_TAG} container_name: mainfluxlabs-filestore depends_on: + - things - filestore-db restart: on-failure environment: @@ -502,6 +503,7 @@ services: image: ${MF_RELEASE_PREFIX}/webhooks:${MF_RELEASE_TAG} container_name: mainfluxlabs-webhooks depends_on: + - things - webhooks-db restart: on-failure environment: @@ -540,6 +542,7 @@ services: image: ${MF_RELEASE_PREFIX}/smtp-notifier:${MF_RELEASE_TAG} container_name: mainfluxlabs-smtp-notifier depends_on: + - things - smtp-notifier-db restart: on-failure environment: @@ -589,8 +592,8 @@ services: image: ${MF_RELEASE_PREFIX}/downlinks:${MF_RELEASE_TAG} container_name: mainfluxlabs-downlinks depends_on: - - downlinks-db - things + - downlinks-db restart: on-failure environment: MF_DOWNLINKS_LOG_LEVEL: ${MF_DOWNLINKS_LOG_LEVEL} @@ -610,3 +613,23 @@ services: - ${MF_DOWNLINKS_HTTP_PORT}:${MF_DOWNLINKS_HTTP_PORT} networks: - mainfluxlabs-base-net + + converters: + image: ${MF_RELEASE_PREFIX}/converters:${MF_RELEASE_TAG} + container_name: mainfluxlabs-converters + restart: on-failure + depends_on: + - things + environment: + MF_CONVERTERS_LOG_LEVEL: ${MF_CONVERTERS_LOG_LEVEL} + MF_CONVERTERS_CLIENT_TLS: ${MF_CONVERTERS_CLIENT_TLS} + MF_CONVERTERS_CA_CERTS: ${MF_CONVERTERS_CA_CERTS} + MF_CONVERTERS_PORT: ${MF_CONVERTERS_PORT} + MF_BROKER_URL: ${MF_BROKER_URL} + MF_JAEGER_URL: ${MF_JAEGER_URL} + MF_THINGS_AUTH_GRPC_URL: ${MF_THINGS_AUTH_GRPC_URL} + MF_THINGS_AUTH_GRPC_TIMEOUT: ${MF_THINGS_AUTH_GRPC_TIMEOUT} + ports: + - ${MF_CONVERTERS_PORT}:${MF_CONVERTERS_PORT} + networks: + - mainfluxlabs-base-net diff --git a/docker/nginx/entrypoint.sh b/docker/nginx/entrypoint.sh index cc9681e3d..c3a1aaa64 100755 --- a/docker/nginx/entrypoint.sh +++ b/docker/nginx/entrypoint.sh @@ -24,6 +24,7 @@ envsubst ' ${MF_WEBHOOKS_HTTP_PORT} ${MF_SMTP_NOTIFIER_PORT} ${MF_DOWNLINKS_HTTP_PORT} + ${MF_CONVERTERS_PORT} ${MF_FILESTORE_HTTP_PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf exec nginx -g "daemon off;" diff --git a/docker/nginx/nginx-key.conf b/docker/nginx/nginx-key.conf index c537dd8d7..6ff4dedf9 100644 --- a/docker/nginx/nginx-key.conf +++ b/docker/nginx/nginx-key.conf @@ -153,6 +153,12 @@ http { proxy_pass http://smtp-notifier:${MF_SMTP_NOTIFIER_PORT}/; } + # Proxy pass to converters service + location /converters/ { + include snippets/proxy-headers.conf; + proxy_pass http://converters:${MF_CONVERTERS_PORT}/; + } + location / { include snippets/proxy-headers.conf; proxy_pass http://ui:${MF_UI_PORT}; diff --git a/docker/nginx/nginx-x509.conf b/docker/nginx/nginx-x509.conf index c68d93fe1..26c07be39 100644 --- a/docker/nginx/nginx-x509.conf +++ b/docker/nginx/nginx-x509.conf @@ -162,6 +162,12 @@ http { proxy_pass http://smtp-notifier:${MF_SMTP_NOTIFIER_PORT}/; } + # Proxy pass to converters service + location /converters/ { + include snippets/proxy-headers.conf; + proxy_pass http://converters:${MF_CONVERTERS_PORT}/; + } + location / { include snippets/proxy-headers.conf; proxy_pass http://ui:${MF_UI_PORT};