46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
services:
|
|
# listens to mqtt packets and saves to database
|
|
meshtastic-mqtt:
|
|
container_name: meshtastic-mqtt
|
|
image: git.arinity.org/ctmesh/map/mqtt:latest
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
command: "--mqtt-topic=msh/US/#"
|
|
environment:
|
|
DATABASE_URL: "mysql://root:password@database:3306/meshtastic-map?connection_limit=100"
|
|
|
|
# runs the web map ui
|
|
meshtastic-map:
|
|
container_name: meshtastic-map
|
|
image: git.arinity.org/ctmesh/map/web:latest
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
command: "--port=8080"
|
|
ports:
|
|
- 8080:8080/tcp
|
|
environment:
|
|
DATABASE_URL: "mysql://root:password@database:3306/meshtastic-map?connection_limit=100"
|
|
|
|
# runs the database to store everything from mqtt
|
|
database:
|
|
container_name: database
|
|
image: bitnami/mariadb
|
|
ports:
|
|
- 3306:3306/tcp
|
|
environment:
|
|
MARIADB_DATABASE: "meshtastic-map"
|
|
MARIADB_ROOT_PASSWORD: "password"
|
|
volumes:
|
|
- database_data:/bitnami/mariadb
|
|
healthcheck:
|
|
test: ['CMD', '/opt/bitnami/scripts/mariadb/healthcheck.sh']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 6
|
|
start_interval: 5s
|
|
|
|
volumes:
|
|
database_data:
|