1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-01 13:48:56 +08:00

49 lines
1.5 KiB
YAML
Raw Normal View History

###
# 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 optional service, execute command:
# docker-compose -f docker/docker-compose.yml -f docker/addons/cassandra-writer/docker-compose.yml up
# from project root.
###
version: "3"
networks:
docker_mainflux-base-net:
external: true
volumes:
mainflux-cassandra-volume:
services:
cassandra:
image: cassandra:3.11.3
container_name: mainflux-cassandra
restart: on-failure
networks:
- docker_mainflux-base-net
ports:
- ${MF_CASSANDRA_WRITER_DB_PORT}:${MF_CASSANDRA_WRITER_DB_PORT}
volumes:
- mainflux-cassandra-volume:/var/lib/cassandra
cassandra-writer:
image: mainflux/cassandra-writer:latest
container_name: mainflux-cassandra-writer
depends_on:
- cassandra
restart: on-failure
environment:
MF_CASSANDRA_WRITER_LOG_LEVEL: ${MF_CASSANDRA_WRITER_LOG_LEVEL}
MF_NATS_URL: ${MF_NATS_URL}
MF_CASSANDRA_WRITER_PORT: ${MF_CASSANDRA_WRITER_PORT}
MF_CASSANDRA_WRITER_DB_PORT: ${MF_CASSANDRA_WRITER_DB_PORT}
MF_CASSANDRA_WRITER_DB_CLUSTER: ${MF_CASSANDRA_WRITER_DB_CLUSTER}
MF_CASSANDRA_WRITER_DB_KEYSPACE: ${MF_CASSANDRA_WRITER_DB_KEYSPACE}
ports:
- ${MF_CASSANDRA_WRITER_PORT}:${MF_CASSANDRA_WRITER_PORT}
networks:
- docker_mainflux-base-net
volumes:
- ./channels.toml:/config/channels.toml