version: '3.8' services: sop_db: image: postgres:15 environment: POSTGRES_USER: admin POSTGRES_PASSWORD: password POSTGRES_DB: sop_monitoring FORCE_RESTART: 4 ports: - "5432:5432" entrypoint: /bin/sh command: > -c " echo 'local all all trust' > /tmp/pg_hba.conf; echo 'host all all 0.0.0.0/0 md5' >> /tmp/pg_hba.conf; echo 'host all all 0.0.0.0/0 scram-sha-256' >> /tmp/pg_hba.conf; chown postgres:postgres /tmp/pg_hba.conf || true; exec /usr/local/bin/docker-entrypoint.sh postgres -c hba_file=/tmp/pg_hba.conf " volumes: - ./db:/docker-entrypoint-initdb.d - pgdata:/var/lib/postgresql/data api: build: ./api environment: - DB_HOST=sop_db - DB_USER=admin - DB_PASS=password - DB_NAME=sop_monitoring - DB_PORT=5432 - PORT=3000 depends_on: - sop_db restart: always ui: build: ./ui expose: - "80" depends_on: - api restart: always volumes: pgdata: