Skip to content

Commit

Permalink
NOISSUE - Add converters docker-compose (#537)
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
  • Loading branch information
manuio authored Nov 4, 2024
1 parent 8fdf936 commit 7bf20f6
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
8 changes: 6 additions & 2 deletions docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 24 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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}
Expand All @@ -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
1 change: 1 addition & 0 deletions docker/nginx/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
6 changes: 6 additions & 0 deletions docker/nginx/nginx-key.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
6 changes: 6 additions & 0 deletions docker/nginx/nginx-x509.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 7bf20f6

Please sign in to comment.