Files
ukmesh/scripts/local-sample/compose.yml
T

52 lines
1.8 KiB
YAML

name: ukmesh-sample
services:
db:
image: timescale/timescaledb@sha256:22e8a5ae7aef121d1537afe946dd7cc5deeeb63ab36ce19849d671bd3b663509
container_name: ukmesh-sample-db
environment:
POSTGRES_USER: meshcore
POSTGRES_PASSWORD: meshcore
POSTGRES_DB: meshcore
ports: ["127.0.0.1:5433:5432"]
# The image's memory-based tuner otherwise lowers this to 25 on small hosts,
# below the backend + resolver pools even though all work is locally owned.
command: ["postgres", "-c", "shared_preload_libraries=timescaledb,pg_stat_statements", "-c", "max_parallel_workers_per_gather=0", "-c", "max_connections=100"]
volumes:
- sample-db:/var/lib/postgresql/data
- ../../backend/src/db/schema/base.sql:/docker-entrypoint-initdb.d/010-base.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U meshcore -d meshcore"]
interval: 2s
timeout: 3s
retries: 60
cpus: 2
mem_limit: 2g
shm_size: "1g"
redis:
image: redis@sha256:8b81dd37ff027bec4e516d41acfbe9fe2460070dc6d4a4570a2ac5b9d59df065
container_name: ukmesh-sample-redis
ports: ["127.0.0.1:6380:6379"]
command: ["redis-server", "--save", "", "--appendonly", "no"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 3s
retries: 30
cpus: 1
mem_limit: 256m
mqtt:
image: eclipse-mosquitto@sha256:75d6662dee52c947dc9dd9c29f1d8d7ffef78ddaf38001caa09755681e8bbc98
container_name: ukmesh-sample-mqtt
ports: ["127.0.0.1:1884:1883", "127.0.0.1:9002:9001"]
volumes:
- ./mosquitto-test.conf:/mosquitto/config/mosquitto.conf:ro
healthcheck:
test: ["CMD-SHELL", "mosquitto_pub -h 127.0.0.1 -t local/health -m ready -q 1"]
interval: 2s
timeout: 3s
retries: 30
cpus: 1
mem_limit: 256m
volumes:
sample-db: