This repository has been archived on 2022-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
Yotter/docker-compose.yml
Seth Simmons 1d52e68b3e
Add healthcheck for yotter (#196)
This is a simple addition that adds a healthcheck for the Yotter web UI, allowing for better monitoring and autohealing of the yotter container if the UI is unavailable.
2021-03-12 22:56:25 +05:30

41 lines
1.0 KiB
YAML

version: "3.8"
services:
mariadb:
image: mariadb:10.5
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: yotter
MYSQL_USER: yotter
MYSQL_PASSWORD: changeme
restart: unless-stopped
volumes:
- mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
ytproxy:
image: 1337kavin/ytproxy:latest
restart: unless-stopped
volumes:
- "/var/run/ytproxy:/app/socket/"
network_mode: host
yotter:
image: ytorg/yotter:latest
restart: unless-stopped
ports:
- "127.0.0.1:5000:5000"
environment:
DATABASE_URL: mysql+pymysql://yotter:changeme@mariadb:3306/yotter
depends_on:
- mariadb
- ytproxy
volumes:
- migrations:/usr/src/app/migrations
- ./yotter-config.json:/usr/src/app/yotter-config.json
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:5000"]
interval: 1m
timeout: 3s
volumes:
mysql:
migrations: