Code: Select all
version: '3'
services:
supla-cloud:
environment:
ADMIN_EMAIL: ${ADMIN_LOGIN}
CLOUD_DOMAIN: ${SUPLA_DOMAIN}
SUPLA_PROTOCOL: https
# Firtst User & Registration
FIRST_USER_EMAIL: ${ADMIN_LOGIN}
FIRST_USER_PASSWORD: ${ADMIN_PASSWORD}
ACCOUNTS_REGISTRATION_ENABLED: ${ACCOUNTS_REGISTRATION_ENABLED}
REQUIRE_REGULATIONS_ACCEPTANCE: ${REQUIRE_REGULATIONS_ACCEPTANCE}
REQUIRE_COOKIE_POLICY_ACCEPTANCE: ${REQUIRE_COOKIE_POLICY_ACCEPTANCE}
BRUTE_FORCE_AUTH_PREVENTION_ENABLED: ${BRUTE_FORCE_AUTH_PREVENTION_ENABLED}
# ReCaptcha
RECAPTCHA_ENABLED: ${RECAPTCHA_ENABLED}
RECAPTCHA_PRIVATE_KEY: ${RECAPTCHA_PRIVATE_KEY}
RECAPTCHA_PUBLIC_KEY: ${RECAPTCHA_PUBLIC_KEY}
# Mailer settings (SMTP)
MAILER_HOST: ${MAILER_HOST}
MAILER_PORT: ${MAILER_PORT}
MAILER_USER: ${MAILER_USER}
MAILER_PASSWORD: ${MAILER_PASSWORD}
MAILER_ENCRYPTION: ${MAILER_ENCRYPTION}
MAILER_FROM: ${MAILER_FROM}
# These options protect your application
DB_PASSWORD: ${DB_PASSWORD}
SECRET: ${SECRET}
# MQTT Broker
MQTT_BROKER_ENABLED: ${MQTT_BROKER_ENABLED}
MQTT_BROKER_HOST: ${MQTT_BROKER_HOST}
MQTT_BROKER_PORT: ${MQTT_BROKER_PORT}
MQTT_BROKER_TLS: ${MQTT_BROKER_TLS}
MQTT_BROKER_USERNAME: ${MQTT_BROKER_USERNAME}
MQTT_BROKER_PASSWORD: ${MQTT_BROKER_PASSWORD}
MQTT_BROKER_CLIENT_ID: ${MQTT_BROKER_CLIENT_ID}
container_name: ${COMPOSE_PROJECT_NAME}-cloud
image: supla/supla-cloud:${IMAGE_VERSION}
links:
- supla-db:supla-db
- supla-server:supla-server
ports:
- ${HTTPS_PORT}:443
restart: always
volumes:
- ${SUPLA_FOLDER}/ssl/cloud:/etc/apache2/ssl:z
- ${SUPLA_FOLDER}/server:/supla-server:z
- ${SUPLA_FOLDER}/cloud-local:/var/www/cloud/var/local
- ${SUPLA_FOLDER}/cloud-logs:/var/www/cloud/var/logs
healthcheck:
test: ["CMD", "curl", "-fk", "https://localhost:443" ]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 30s
disable : false
supla-db:
environment:
MYSQL_DATABASE: supla
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: supla
container_name: ${COMPOSE_PROJECT_NAME}-db
image: mysql:5.7.20
ports:
- ${DB_PORT}:3306
restart: always
volumes:
- ${SUPLA_FOLDER}/mysql:/var/lib/mysql:z
supla-server:
environment:
DB_PASSWORD: ${DB_PASSWORD}
CLOUD_DOMAIN: ${SUPLA_DOMAIN}
# MQTT Broker
MQTT_BROKER_ENABLED: ${MQTT_BROKER_ENABLED}
MQTT_BROKER_HOST: ${MQTT_BROKER_HOST}
MQTT_BROKER_PORT: ${MQTT_BROKER_PORT}
MQTT_BROKER_TLS: ${MQTT_BROKER_TLS}
MQTT_BROKER_USERNAME: ${MQTT_BROKER_USERNAME}
MQTT_BROKER_PASSWORD: ${MQTT_BROKER_PASSWORD}
MQTT_BROKER_CLIENT_ID: ${MQTT_BROKER_CLIENT_ID}
container_name: ${COMPOSE_PROJECT_NAME}-server
image: supla/supla-server:${IMAGE_VERSION}
links:
- supla-db:supla-db
ports:
- 2016:2016
- 2015:2015
restart: always
volumes:
- ${SUPLA_FOLDER}/ssl/server:/etc/supla-server/ssl:z
- ${SUPLA_FOLDER}/server:/var/run/supla:z
healthcheck:
test: ["CMD-SHELL", 'echo "Q" | openssl s_client -connect localhost:2016']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 30s
disable : false