version: '3.8' services: postgres: image: postgres:16-alpine container_name: wetterstation_db restart: unless-stopped environment: POSTGRES_DB: ${DB_NAME} POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASSWORD} ports: - "${DB_PORT}:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"] interval: 10s timeout: 5s retries: 5 pgadmin: image: dpage/pgadmin4:latest container_name: wetterstation_pgadmin restart: unless-stopped environment: PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@admin.com} PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin} PGADMIN_CONFIG_SERVER_MODE: 'False' ports: - "5050:80" volumes: - pgadmin_data:/var/lib/pgadmin depends_on: - postgres collector: image: docker.citysensor.de/wetterstation-collector:latest build: context: ./collector dockerfile: Dockerfile container_name: wetterstation_collector restart: unless-stopped ports: - "8001:8001" env_file: - ./.env environment: DB_HOST: postgres depends_on: postgres: condition: service_healthy api: image: docker.citysensor.de/wetterstation-api:latest build: context: ./api dockerfile: Dockerfile container_name: wetterstation_api restart: unless-stopped env_file: - ./.env environment: DB_HOST: postgres ports: - "8000:8000" depends_on: postgres: condition: service_healthy frontend: image: docker.citysensor.de/wetterstation-frontend:latest build: context: ./frontend dockerfile: Dockerfile container_name: wetterstation_frontend restart: unless-stopped ports: - "80:80" depends_on: - api volumes: postgres_data: driver: local pgadmin_data: driver: local