meshtastic-map/docker-compose.yml

65 lines
1.6 KiB
YAML
Raw Normal View History

services:
2024-06-14 17:26:02 +12:00
# listens to mqtt packets and saves to database
meshtastic-mqtt:
container_name: meshtastic-mqtt
depends_on:
database:
condition: service_healthy
build:
2024-06-15 14:48:42 +12:00
context: .
dockerfile: ./Dockerfile
command: /app/docker/mqtt.sh
2024-06-14 17:26:02 +12:00
environment:
DATABASE_URL: "mysql://root:password@database:3306/meshtastic-map?connection_limit=100"
MQTT_OPTS: "" # add any custom mqtt.js options here
2024-06-14 17:26:02 +12:00
# runs the web map ui
meshtastic-map:
container_name: meshtastic-map
depends_on:
database:
condition: service_healthy
build:
2024-06-15 14:48:42 +12:00
context: .
dockerfile: ./Dockerfile
2024-06-14 17:26:02 +12:00
command: /app/docker/map.sh
ports:
- 8080:8080/tcp
2024-06-14 17:26:02 +12:00
environment:
DATABASE_URL: "mysql://root:password@database:3306/meshtastic-map?connection_limit=100"
MAP_OPTS: "" # add any custom index.js options here
# publishes mqtt packets via websocket
meshtastic-ws:
container_name: meshtastic-ws
build:
context: .
dockerfile: ./Dockerfile
command: /app/docker/ws.sh
ports:
- 8081:8081/tcp
environment:
WS_OPTS: ""
2024-06-14 17:26:02 +12:00
# runs the database to store everything from mqtt
database:
container_name: database
image: bitnami/mariadb
ports:
- 3306:3306/tcp
2024-06-14 17:26:02 +12:00
environment:
MARIADB_DATABASE: "meshtastic-map"
MARIADB_ROOT_PASSWORD: "password"
volumes:
2024-06-14 17:26:02 +12:00
- database_data:/bitnami/mariadb
healthcheck:
test: ['CMD', '/opt/bitnami/scripts/mariadb/healthcheck.sh']
interval: 15s
timeout: 5s
retries: 6
start_interval: 5s
volumes:
2024-06-14 17:26:02 +12:00
database_data: