version: '3.8' volumes: postgres-data: services: app: build: context: . dockerfile: Dockerfile env_file: - .env volumes: - ../..:/workspaces:cached - ${SSH_AUTH_SOCK}:/tmp/ssh-agent.socket command: sleep infinity network_mode: service:db db: image: postgres:15-alpine3.17 restart: unless-stopped volumes: - postgres-data:/var/lib/postgresql/data env_file: - .env