version: '3.8' services: # Database PostgreSQL postgres: image: postgres:16-alpine container_name: terrain_monitor_db environment: POSTGRES_USER: terrain_user POSTGRES_PASSWORD: terrain_pass POSTGRES_DB: terrain_monitor ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U terrain_user"] interval: 10s timeout: 5s retries: 5 # MQTT Broker (Mosquitto) mosquitto: image: eclipse-mosquitto:2 container_name: terrain_monitor_mqtt ports: - "1883:1883" - "9001:9001" volumes: - ./mosquitto/config:/mosquitto/config - ./mosquitto/data:/mosquitto/data - ./mosquitto/log:/mosquitto/log command: mosquitto -c /mosquitto/config/mosquitto.conf # pgAdmin (opzionale - UI per PostgreSQL) pgadmin: image: dpage/pgadmin4:latest container_name: terrain_monitor_pgadmin environment: PGADMIN_DEFAULT_EMAIL: admin@aseltd.eu PGADMIN_DEFAULT_PASSWORD: admin ports: - "5050:80" depends_on: - postgres volumes: postgres_data: