version: "3" services: pg: build: context: . dockerfile: Dockerfile.pg ports: - "5432" environment: POSTGRES_HOST_AUTH_METHOD: trust app: build: context: . dockerfile: Dockerfile image: rails6-app:${RUBY_VERSION} command: [ "./bin/rails", "server", "-b", "0.0.0.0", "-u", "webrick" ] environment: RAILS_ENV: ORM_MODULE: PGHOST: pg PGPORT: '5432' DATABASE_URL: postgres://postgres@pg APPMAP: volumes: - .:/src/app ports: - "3000" links: - pg:pg