Scaffold repo: infra docker-compose, service layout, README
Sets up the microservice home-automation platform skeleton: docker-compose for mosquitto/postgres/clickhouse/redis/rabbitmq, per-service README stubs describing responsibilities, and top-level README with architecture/stack. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
networks:
|
||||
home-automation:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
clickhouse-data:
|
||||
redis-data:
|
||||
rabbitmq-data:
|
||||
mosquitto-data:
|
||||
|
||||
services:
|
||||
mosquitto:
|
||||
image: eclipse-mosquitto:2
|
||||
ports:
|
||||
- "1883:1883"
|
||||
volumes:
|
||||
- ./configs/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
- mosquitto-data:/mosquitto/data
|
||||
networks:
|
||||
- home-automation
|
||||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
ports:
|
||||
- "${POSTGRES_PORT}:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
- ./migrations/postgres:/docker-entrypoint-initdb.d:ro
|
||||
networks:
|
||||
- home-automation
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
restart: unless-stopped
|
||||
|
||||
clickhouse:
|
||||
image: clickhouse/clickhouse-server:24-alpine
|
||||
environment:
|
||||
CLICKHOUSE_DB: ${CLICKHOUSE_DB}
|
||||
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
|
||||
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
|
||||
ports:
|
||||
- "${CLICKHOUSE_HTTP_PORT}:8123"
|
||||
- "${CLICKHOUSE_NATIVE_PORT}:9000"
|
||||
volumes:
|
||||
- clickhouse-data:/var/lib/clickhouse
|
||||
- ./migrations/clickhouse:/docker-entrypoint-initdb.d:ro
|
||||
networks:
|
||||
- home-automation
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "${REDIS_PORT}:6379"
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
networks:
|
||||
- home-automation
|
||||
restart: unless-stopped
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:3-management-alpine
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
|
||||
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
|
||||
ports:
|
||||
- "${RABBITMQ_PORT}:5672"
|
||||
- "${RABBITMQ_MANAGEMENT_PORT}:15672"
|
||||
volumes:
|
||||
- rabbitmq-data:/var/lib/rabbitmq
|
||||
networks:
|
||||
- home-automation
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
restart: unless-stopped
|
||||
|
||||
# App services (ingest-service, device-control-service, rule-engine-service,
|
||||
# health-check-service, esp32-emulator, laravel-app) are added here as they
|
||||
# get implemented — see services/*/README.md for the plan for each one.
|
||||
Reference in New Issue
Block a user