### # Copyright (c) 2015-2017 Mainflux # # Mainflux is licensed under an Apache license, version 2.0 license. # All rights not explicitly granted in the Apache license, version 2.0 are reserved. # See the included LICENSE file for more details. ### version: "3" networks: mainflux-base-net: driver: bridge volumes: mainflux-users-db-volume: mainflux-things-db-volume: mainflux-mqtt-redis-volume: mainflux-things-redis-volume: mainflux-es-redis-volume: services: nginx: image: nginx:1.16.0-alpine container_name: mainflux-nginx restart: on-failure volumes: - ./nginx/nginx-${AUTH-key}.conf:/etc/nginx/nginx.conf.template - ./nginx/entrypoint.sh:/entrypoint.sh - ./ssl/authorization.js:/etc/nginx/authorization.js - ./ssl/certs/mainflux-server.crt:/etc/ssl/certs/mainflux-server.crt - ./ssl/certs/ca.crt:/etc/ssl/certs/ca.crt - ./ssl/certs/mainflux-server.key:/etc/ssl/private/mainflux-server.key - ./ssl/dhparam.pem:/etc/ssl/certs/dhparam.pem ports: - 80:80 - 443:443 - 8883:8883 networks: - mainflux-base-net environment: - UI_PORT command: /entrypoint.sh nats: image: nats:1.3.0 container_name: mainflux-nats restart: on-failure networks: - mainflux-base-net users-db: image: postgres:10.8-alpine container_name: mainflux-users-db restart: on-failure environment: POSTGRES_USER: mainflux POSTGRES_PASSWORD: mainflux POSTGRES_DB: users networks: - mainflux-base-net volumes: - mainflux-users-db-volume:/var/lib/postgresql/data users: image: mainflux/users:latest container_name: mainflux-users depends_on: - users-db expose: - 8181 restart: on-failure environment: MF_USERS_LOG_LEVEL: debug MF_USERS_DB_HOST: users-db MF_USERS_DB_PORT: 5432 MF_USERS_DB_USER: mainflux MF_USERS_DB_PASS: mainflux MF_USERS_DB: users MF_USERS_HTTP_PORT: 8180 MF_USERS_GRPC_PORT: 8181 MF_USERS_SECRET: secret ports: - 8180:8180 networks: - mainflux-base-net things-db: image: postgres:10.8-alpine container_name: mainflux-things-db restart: on-failure environment: POSTGRES_USER: mainflux POSTGRES_PASSWORD: mainflux POSTGRES_DB: things networks: - mainflux-base-net volumes: - mainflux-things-db-volume:/var/lib/postgresql/data things-redis: image: redis:5.0-alpine container_name: mainflux-things-redis restart: on-failure networks: - mainflux-base-net volumes: - mainflux-things-redis-volume:/data things: image: mainflux/things:latest container_name: mainflux-things depends_on: - things-db - users restart: on-failure environment: MF_THINGS_LOG_LEVEL: debug MF_THINGS_DB_HOST: things-db MF_THINGS_DB_PORT: 5432 MF_THINGS_DB_USER: mainflux MF_THINGS_DB_PASS: mainflux MF_THINGS_DB: things MF_THINGS_CACHE_URL: things-redis:6379 MF_THINGS_ES_URL: es-redis:6379 MF_THINGS_HTTP_PORT: 8182 MF_THINGS_GRPC_PORT: 8183 MF_USERS_URL: users:8181 MF_THINGS_SECRET: secret ports: - 8182:8182 - 8183:8183 networks: - mainflux-base-net normalizer: image: mainflux/normalizer:latest container_name: mainflux-normalizer restart: on-failure depends_on: - nats expose: - 8184 environment: MF_NORMALIZER_LOG_LEVEL: debug MF_NATS_URL: nats://nats:4222 MF_NORMALIZER_PORT: 8184 ports: - 8184:8184 networks: - mainflux-base-net ui: image: mainflux/ui:latest container_name: mainflux-ui restart: on-failure ports: - ${UI_PORT}:${UI_PORT} networks: - mainflux-base-net environment: - UI_PORT ws-adapter: image: mainflux/ws:latest container_name: mainflux-ws depends_on: - things - nats restart: on-failure environment: MF_WS_ADAPTER_LOG_LEVEL: debug MF_WS_ADAPTER_PORT: 8186 MF_NATS_URL: nats://nats:4222 MF_THINGS_URL: things:8183 ports: - 8186:8186 networks: - mainflux-base-net http-adapter: image: mainflux/http:latest container_name: mainflux-http depends_on: - things - nats restart: on-failure expose: - 8185 environment: MF_HTTP_ADAPTER_LOG_LEVEL: debug MF_HTTP_ADAPTER_PORT: 8185 MF_NATS_URL: nats://nats:4222 MF_THINGS_URL: things:8183 ports: - 8185:8185 networks: - mainflux-base-net es-redis: image: redis:5.0-alpine container_name: mainflux-es-redis restart: on-failure networks: - mainflux-base-net volumes: - mainflux-es-redis-volume:/data mqtt-redis: image: redis:5.0-alpine container_name: mainflux-mqtt-redis restart: on-failure networks: - mainflux-base-net volumes: - mainflux-mqtt-redis-volume:/data mqtt-adapter: image: mainflux/mqtt:latest container_name: mainflux-mqtt depends_on: - things - nats - mqtt-redis restart: on-failure environment: MF_MQTT_ADAPTER_LOG_LEVEL: debug MF_MQTT_INSTANCE_ID: mqtt-adapter-1 MF_MQTT_ADAPTER_PORT: 1883 MF_MQTT_ADAPTER_WS_PORT: 8880 MF_MQTT_ADAPTER_REDIS_HOST: mqtt-redis MF_MQTT_ADAPTER_ES_HOST: es-redis MF_NATS_URL: nats://nats:4222 MF_THINGS_URL: things:8183 ports: - 1883:1883 - 8880:8880 networks: - mainflux-base-net coap-adapter: image: mainflux/coap:latest container_name: mainflux-coap depends_on: - things - nats restart: on-failure environment: MF_COAP_ADAPTER_LOG_LEVEL: debug MF_COAP_ADAPTER_PORT: 5683 MF_NATS_URL: nats://nats:4222 MF_THINGS_URL: things:8183 ports: - 5683:5683/udp networks: - mainflux-base-net