1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-24 13:48:49 +08:00
b1ackd0t 8b185d205b
MF - 1758 - Sync With Benchmark Testing (#1912)
* feat(docker): add trace ration and max conn

This adds a new environment variable `MF_JAEGER_TRACE_RATIO` to the `docker/.env` file. The variable is used to set the ratio of requests traced.

Additionally, this commit also adds a new environment variable `MF_POSTGRES_MAX_CONNECTIONS` for configuring the maximum number of connections for the Postgres database.

These changes are made to enhance the configuration and scalability of the core services.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* Remove comment to trace ratio

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Reduce postgres max connection to 100

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-10-24 18:59:49 +02:00

69 lines
2.3 KiB
YAML

# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0
# This docker-compose file contains optional Cassandra and cassandra-writer. 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/cassandra-writer/docker-compose.yml up
# from project root.
version: "3.7"
networks:
mainflux-base-net:
volumes:
mainflux-cassandra-volume:
services:
cassandra:
image: cassandra:3.11.10
container_name: mainflux-cassandra
restart: on-failure
networks:
- mainflux-base-net
ports:
- ${MF_CASSANDRA_PORT}:${MF_CASSANDRA_PORT}
volumes:
- mainflux-cassandra-volume:/var/lib/cassandra
cassandra-init-keyspace:
image: cassandra:3.11.10
depends_on:
- cassandra
restart: on-failure
volumes:
- ./init.sh:/init.sh
entrypoint: ["/init.sh"]
networks:
- mainflux-base-net
cassandra-writer:
image: mainflux/cassandra-writer:${MF_RELEASE_TAG}
container_name: mainflux-cassandra-writer
depends_on:
- cassandra
restart: on-failure
environment:
MF_CASSANDRA_WRITER_LOG_LEVEL: ${MF_CASSANDRA_WRITER_LOG_LEVEL}
MF_CASSANDRA_WRITER_CONFIG_PATH: ${MF_CASSANDRA_WRITER_CONFIG_PATH}
MF_CASSANDRA_WRITER_HTTP_HOST: ${MF_CASSANDRA_WRITER_HTTP_HOST}
MF_CASSANDRA_WRITER_HTTP_PORT: ${MF_CASSANDRA_WRITER_HTTP_PORT}
MF_CASSANDRA_WRITER_HTTP_SERVER_CERT: ${MF_CASSANDRA_WRITER_HTTP_SERVER_CERT}
MF_CASSANDRA_WRITER_HTTP_SERVER_KEY: ${MF_CASSANDRA_WRITER_HTTP_SERVER_KEY}
MF_CASSANDRA_PORT: ${MF_CASSANDRA_PORT}
MF_CASSANDRA_CLUSTER: ${MF_CASSANDRA_CLUSTER}
MF_CASSANDRA_KEYSPACE: ${MF_CASSANDRA_KEYSPACE}
MF_CASSANDRA_USER: ${MF_CASSANDRA_USER}
MF_CASSANDRA_PASS: ${MF_CASSANDRA_PASS}
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
MF_JAEGER_URL: ${MF_JAEGER_URL}
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
MF_CASSANDRA_WRITER_INSANCE_ID: ${MF_CASSANDRA_WRITER_INSANCE_ID}
ports:
- ${MF_CASSANDRA_WRITER_HTTP_PORT}:${MF_CASSANDRA_WRITER_HTTP_PORT}
networks:
- mainflux-base-net
volumes:
- ./config.toml:/config.toml