version: "3.4" services: ct-diag-server: build: context: . command: ["-dev", "-cacheInterval", "10s"] environment: POSTGRES_DSN: "postgres://ct-diag:${POSTGRES_PASSWORD}@postgres:5432?sslmode=disable" restart: on-failure depends_on: - postgres ports: - "8080:80" postgres: image: postgres:11.7-alpine restart: always environment: POSTGRES_USER: ct-diag POSTGRES_PASSWORD: volumes: - ./db/postgres/schema.sql:/docker-entrypoint-initdb.d/schema.sql ports: - "5432:5432"