mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 04:20:17 +00:00
658003080e
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
64 lines
2.5 KiB
YAML
64 lines
2.5 KiB
YAML
# Copyright (c) Abstract Machines
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# This docker-compose file contains optional Postgres and Postgres-writer services
|
|
# for Magistrala platform. Since these are optional, this file is dependent of docker-compose file
|
|
# from <project_root>/docker. In order to run these services, execute command:
|
|
# docker compose -f docker/docker-compose.yml -f docker/addons/postgres-writer/docker-compose.yml up
|
|
# from project root. PostgreSQL default port (5432) is exposed, so you can use various tools for database
|
|
# inspection and data visualization.
|
|
|
|
networks:
|
|
magistrala-base-net:
|
|
|
|
volumes:
|
|
magistrala-postgres-writer-volume:
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16.2-alpine
|
|
container_name: magistrala-postgres
|
|
restart: on-failure
|
|
environment:
|
|
POSTGRES_USER: ${MG_POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${MG_POSTGRES_PASS}
|
|
POSTGRES_DB: ${MG_POSTGRES_NAME}
|
|
networks:
|
|
- magistrala-base-net
|
|
volumes:
|
|
- magistrala-postgres-writer-volume:/var/lib/postgresql/data
|
|
|
|
postgres-writer:
|
|
image: magistrala/postgres-writer:${MG_RELEASE_TAG}
|
|
container_name: magistrala-postgres-writer
|
|
depends_on:
|
|
- postgres
|
|
restart: on-failure
|
|
environment:
|
|
MG_POSTGRES_WRITER_LOG_LEVEL: ${MG_POSTGRES_WRITER_LOG_LEVEL}
|
|
MG_POSTGRES_WRITER_CONFIG_PATH: ${MG_POSTGRES_WRITER_CONFIG_PATH}
|
|
MG_POSTGRES_WRITER_HTTP_HOST: ${MG_POSTGRES_WRITER_HTTP_HOST}
|
|
MG_POSTGRES_WRITER_HTTP_PORT: ${MG_POSTGRES_WRITER_HTTP_PORT}
|
|
MG_POSTGRES_WRITER_HTTP_SERVER_CERT: ${MG_POSTGRES_WRITER_HTTP_SERVER_CERT}
|
|
MG_POSTGRES_WRITER_HTTP_SERVER_KEY: ${MG_POSTGRES_WRITER_HTTP_SERVER_KEY}
|
|
MG_POSTGRES_HOST: ${MG_POSTGRES_HOST}
|
|
MG_POSTGRES_PORT: ${MG_POSTGRES_PORT}
|
|
MG_POSTGRES_USER: ${MG_POSTGRES_USER}
|
|
MG_POSTGRES_PASS: ${MG_POSTGRES_PASS}
|
|
MG_POSTGRES_NAME: ${MG_POSTGRES_NAME}
|
|
MG_POSTGRES_SSL_MODE: ${MG_POSTGRES_SSL_MODE}
|
|
MG_POSTGRES_SSL_CERT: ${MG_POSTGRES_SSL_CERT}
|
|
MG_POSTGRES_SSL_KEY: ${MG_POSTGRES_SSL_KEY}
|
|
MG_POSTGRES_SSL_ROOT_CERT: ${MG_POSTGRES_SSL_ROOT_CERT}
|
|
MG_MESSAGE_BROKER_URL: ${MG_MESSAGE_BROKER_URL}
|
|
MG_JAEGER_URL: ${MG_JAEGER_URL}
|
|
MG_JAEGER_TRACE_RATIO: ${MG_JAEGER_TRACE_RATIO}
|
|
MG_SEND_TELEMETRY: ${MG_SEND_TELEMETRY}
|
|
MG_POSTGRES_WRITER_INSTANCE_ID: ${MG_POSTGRES_WRITER_INSTANCE_ID}
|
|
ports:
|
|
- ${MG_POSTGRES_WRITER_HTTP_PORT}:${MG_POSTGRES_WRITER_HTTP_PORT}
|
|
networks:
|
|
- magistrala-base-net
|
|
volumes:
|
|
- ./config.toml:/config.toml
|