version: '3' services: db: image: postgres:latest hostname: db restart: always environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password - POSTGRES_DB=postgres ports: - '5532:5432' expose: - '5532' volumes: - ./docker/postgres/data:/var/lib/postgresql/data newspipe: build: context: . dockerfile: ./Dockerfile tty: true environment: - Newspipe_CONFIG=/newspipe/instance/config.py ports: - "5000:5000" expose: - '5000' depends_on: - db command: "./wait-for-postgres.sh db"