mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-29 13:49:28 +08:00

* Expose the InfluxDB and Cassandra ports to host Expose the InfluxDB's HTTP API port 8086 and Cassandra's CQL port 9042 from the containers to the host machine, in order to enable easier exploration of the data stored in the databases from the host machine and development of apps which connect and use the data stored in the databases. Signed-off-by: Jovan Kostovski <chombium@gmail.com> * Port exposing cleanup in docker-compose.yml files There were some doubled configurations for port exposing with the expose and ports directives in the docker-compose.yml files which had to be cleaned. Signed-off-by: Jovan Kostovski <chombium@gmail.com>
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
###
|
|
# This docker-compose file contains optional MongoDB and MongoDB-writer services
|
|
# for Mainflux platform. 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/mongodb-writer/docker-compose.yml up
|
|
# from project root. MongoDB default port (27017) is exposed, so you can use various tools for database
|
|
# inspection and data visualization.
|
|
###
|
|
|
|
version: "3"
|
|
|
|
networks:
|
|
docker_mainflux-base-net:
|
|
external: true
|
|
|
|
services:
|
|
mongodb:
|
|
image: mongo:3.6-jessie
|
|
container_name: mainflux-mongodb
|
|
restart: on-failure
|
|
environment:
|
|
MONGO_INITDB_DATABASE: mainflux
|
|
ports:
|
|
- 27017:27017
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
|
|
mongodb-writer:
|
|
image: mainflux/mongodb-writer:latest
|
|
container_name: mainflux-mongodb-writer
|
|
depends_on:
|
|
- mongodb
|
|
restart: on-failure
|
|
environment:
|
|
MF_NATS_URL: nats://nats:4222
|
|
MF_MONGO_WRITER_PORT: 8901
|
|
MF_MONGO_WRITER_DB_NAME: mainflux
|
|
MF_MONGO_WRITER_DB_HOST: mongodb
|
|
MF_MONGO_WRITER_DB_PORT: 27017
|
|
ports:
|
|
- 8901:8901
|
|
networks:
|
|
- docker_mainflux-base-net
|