version: "3.7" x-default_rails_environment_variables: &default_rails_environment_variables POSTGRES_USERNAME: postgres POSTGRES_PASSWORD: POSTGRES_HOST: postgres POSTGRES_PORT: 5432 POSTGRES_DBNAME: app_perf_development services: web: command: bin/web build: context: . dockerfile: Dockerfile.production args: <<: *default_rails_environment_variables ports: - "5000:5000" depends_on: - "postgres" - "redis" links: - "postgres" - "redis" environment: PORT: 5000 <<: *default_rails_environment_variables job: command: bin/job build: context: . dockerfile: Dockerfile.production args: <<: *default_rails_environment_variables depends_on: - "postgres" - "redis" links: - "postgres" - "redis" environment: <<: *default_rails_environment_variables agent: command: bin/agent build: context: . dockerfile: Dockerfile.production args: <<: *default_rails_environment_variables depends_on: - "web" - "job" links: - "web" - "job" environment: APP_PERF_HOST: app_perf APP_PERF_LICENSE: e47a7331-77cd-4ea0-8be1-b4130255a3a8 <<: *default_rails_environment_variables postgres: image: "postgres:10.5-alpine" ports: - "5432:5432" volumes: - "./data/postgres/postgres:/var/lib/postgresql/data:rw" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 redis: image: redis:4.0.11-alpine ports: - "6379:6379" volumes: - "./data/redis/redis:/data:rw" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 10s retries: 3