forked from homeofmaking/OpenUnitStateBackend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
39 lines (37 loc) · 989 Bytes
/
compose.yml
File metadata and controls
39 lines (37 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: openunitstate-backend
services:
db:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- ./database:/var/lib/mysql
- ./sql_structure_openunitstate.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
timeout: 20s
retries: 10
restart: unless-stopped
app:
build: .
depends_on:
db:
condition: service_healthy
environment:
DB_HOST: db
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
MQTT_URL: ${MQTT_URL}
MQTT_CLIENT_ID: ${MQTT_CLIENT_ID}
MQTT_USERNAME: ${MQTT_USERNAME}
MQTT_PASSWORD: ${MQTT_PASSWORD}
ROOT_TOPIC: ${ROOT_TOPIC}
restart: unless-stopped
networks:
default:
driver: bridge
name: openunitstate