Mainflux.mainflux/docker/addons/smtp-notifier/docker-compose.yml

63 lines
2.2 KiB
YAML

# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0
# This docker-compose file contains optional InfluxDB, InfluxDB-writer and Grafana services
# for the Mainflux platform. Since this services are optional, this file is dependent on the
# docker-compose.yml file from <project_root>/docker/. In order to run these services,
# core services, as well as the network from the core composition, should be already running.
version: "3.7"
networks:
docker_mainflux-base-net:
external: true
volumes:
mainflux-smtp-notifier-volume:
services:
postgres:
image: postgres:10.2-alpine
container_name: mainflux-smtp-notifier-db
restart: on-failure
environment:
POSTGRES_USER: ${MF_SMTP_NOTIFIER_DB_USER}
POSTGRES_PASSWORD: ${MF_SMTP_NOTIFIER_DB_PASS}
POSTGRES_DB: ${MF_SMTP_NOTIFIER_DB}
networks:
- docker_mainflux-base-net
volumes:
- mainflux-smtp-notifier-volume:/var/lib/postgresql/datab
smtp-notifier:
image: mainflux/smtp-notifier:latest
container_name: mainflux-smtp-notifier
depends_on:
- postgres
restart: on-failure
environment:
MF_SMTP_NOTIFIER_LOG_LEVEL: ${MF_SMTP_NOTIFIER_LOG_LEVEL}
MF_SMTP_NOTIFIER_DB_HOST: postgres
MF_SMTP_NOTIFIER_DB_PORT: ${MF_SMTP_NOTIFIER_DB_PORT}
MF_SMTP_NOTIFIER_DB_USER: ${MF_SMTP_NOTIFIER_DB_USER}
MF_SMTP_NOTIFIER_DB_PASS: ${MF_SMTP_NOTIFIER_DB_PASS}
MF_SMTP_NOTIFIER_DB: ${MF_SMTP_NOTIFIER_DB}
MF_SMTP_NOTIFIER_PORT: ${MF_SMTP_NOTIFIER_PORT}
MF_NATS_URL: ${MF_NATS_URL}
MF_JAEGER_URL: ${MF_JAEGER_URL}
MF_AUTH_GRPC_URL: ${MF_AUTH_GRPC_URL}
MF_AUTH_GRPC_TIMEOUT: ${MF_AUTH_GRPC_TIMEOUT}
MF_EMAIL_USERNAME: ${MF_EMAIL_USERNAME}
MF_EMAIL_PASSWORD: ${MF_EMAIL_PASSWORD}
MF_EMAIL_PORT: ${MF_EMAIL_PORT}
MF_EMAIL_FROM_ADDRESS: ${MF_EMAIL_FROM_ADDRESS}
MF_EMAIL_FROM_NAME: ${MF_EMAIL_FROM_NAME}
MF_EMAIL_TEMPLATE: ${MF_EMAIL_TEMPLATE}
ports:
- ${MF_SMTP_NOTIFIER_PORT}:${MF_SMTP_NOTIFIER_PORT}
networks:
- docker_mainflux-base-net
volumes:
- ./config.toml:/config.toml
- ../../templates/${MF_SMTP_NOTIFIER_TEMPLATE}:/${MF_EMAIL_TEMPLATE}