app backend prima

This commit is contained in:
2025-10-20 19:10:08 +02:00
commit 438255d27b
42 changed files with 4622 additions and 0 deletions

48
docker-compose.yml Normal file
View File

@@ -0,0 +1,48 @@
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: