Code: Select all
version: '3.4'
services:
supla-cloud:
container_name: ${COMPOSE_PROJECT_NAME}-cloud
restart: unless-stopped
image: supla/supla-cloud
env_file:
- .env.default
- .env
volumes:
- ./ssl/cloud:/etc/apache2/ssl:z
- ${VOLUME_DATA}/cloud-local:/var/www/cloud/var/local
- ${VOLUME_DATA}/cloud-logs:/var/www/cloud/var/logs
- supla-server-socket:/supla-server:z
logging:
driver: "json-file"
options:
max-size: 50m
depends_on:
- supla-db
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://${CLOUD_DOMAIN}/api/server-info"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
supla-db:
container_name: ${COMPOSE_PROJECT_NAME}-db
restart: unless-stopped
image: mysql:5.7.20
env_file:
- .env.default
- .env
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: supla
MYSQL_USER: supla
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- ${VOLUME_DATA}/mysql:/var/lib/mysql:z
ports:
- "3306:3306"
logging:
driver: "json-file"
options:
max-size: 50m
supla-server:
container_name: ${COMPOSE_PROJECT_NAME}-server
restart: unless-stopped
image: supla/supla-server
env_file:
- .env.default
- .env
volumes:
- ./ssl/server:/etc/supla-server/ssl:z
- supla-server-socket:/var/run/supla:z
ports:
- "2016:2016"
- "2015:2015"
logging:
driver: "json-file"
options:
max-size: 50m
depends_on:
- supla-cloud
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://${CLOUD_DOMAIN}/api/server-status"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
volumes:
supla-server-socket: {}