version: '3.2' volumes: pg-data: services: db: image: postgres:11.1-alpine restart: always environment: POSTGRES_PASSWORD: password POSTGRES_USER: postgres ports: - '5432:5432' volumes: - pg-data:/var/lib/postgresql web: build: . volumes: - type: bind source: . target: /app ports: - "4000:4000" depends_on: - db links: - db:database command: - ./run.sh