version: "3.9" name: "road_vision__hub" services: mqtt: image: eclipse-mosquitto container_name: mqtt volumes: - ./mosquitto:/mosquitto - ./mosquitto/data:/mosquitto/data - ./mosquitto/log:/mosquitto/log ports: - 1883:1883 - 9001:9001 networks: mqtt_network: postgres_db: image: postgres:latest container_name: postgres_db restart: always environment: POSTGRES_USER: user POSTGRES_PASSWORD: pass POSTGRES_DB: test_db volumes: - postgres_data:/var/lib/postgresql/data - ./db/structure.sql:/docker-entrypoint-initdb.d/structure.sql ports: - "5432:5432" networks: db_network: pgadmin: container_name: pgadmin4 image: dpage/pgadmin4 restart: always environment: PGADMIN_DEFAULT_EMAIL: admin@admin.com PGADMIN_DEFAULT_PASSWORD: root volumes: - pgadmin-data:/var/lib/pgadmin ports: - "5050:80" networks: db_network: store: container_name: store build: ../../store depends_on: - postgres_db restart: always environment: POSTGRES_USER: user POSTGRES_PASSWORD: pass POSTGRES_DB: test_db POSTGRES_HOST: postgres_db POSTGRES_PORT: 5432 ports: - "8000:8000" networks: db_network: hub_store: redis: image: redis:latest container_name: redis ports: - "6379:6379" networks: hub_redis: hub: container_name: hub build: ../ depends_on: - mqtt - redis - store environment: STORE_API_HOST: "store" STORE_API_PORT: 8000 REDIS_HOST: "redis" REDIS_PORT: 6379 MQTT_BROKER_HOST: "mqtt" MQTT_BROKER_PORT: 1883 MQTT_TOPIC: "processed_data_topic" BATCH_SIZE: 1 ports: - "9000:8000" networks: mqtt_network: hub_store: hub_redis: networks: mqtt_network: db_network: hub_store: hub_redis: volumes: postgres_data: pgadmin-data: