version: '3' services: web: restart: always build: context: . dockerfile: deploy/docker/web.Dockerfile ports: - "80:5000" depends_on: redis: condition: service_started postgres: condition: service_healthy volumes: - "${SAMPLES_DIR}:/mnt/samples" environment: - "REDIS_HOST=redis" - "MQUERY_BACKEND=tcp://ursadb:9281" - "DATABASE_URL=postgresql://postgres:password@postgres:5432/mquery" healthcheck: test: ["CMD-SHELL", "curl --fail http://localhost:5000/api/server || exit 1"] interval: 5s timeout: 5s retries: 30 daemon: restart: always build: context: . dockerfile: deploy/docker/daemon.Dockerfile links: - redis - ursadb - postgres volumes: - "${SAMPLES_DIR}:/mnt/samples" depends_on: web: condition: service_healthy redis: condition: service_started ursadb: condition: service_started postgres: condition: service_healthy environment: - "REDIS_HOST=redis" - "MQUERY_BACKEND=tcp://ursadb:9281" - "DATABASE_URL=postgresql://postgres:password@postgres:5432/mquery" ursadb: restart: always image: mqueryci/ursadb:v1.5.1 ports: - "127.0.0.1:9281:9281" volumes: - "${SAMPLES_DIR}:/mnt/samples" - "${INDEX_DIR}:/var/lib/ursadb" user: "0:0" redis: restart: always image: redis postgres: image: postgres restart: always volumes: - ${POSTGRES_DIR}:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=password - POSTGRES_DB=mquery healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5