services: db: image: postgres:16.4-alpine environment: POSTGRES_PASSWORD: password POSTGRES_USER: postgres volumes: - db_data:/var/lib/postgresql/data web: &web build: . platform: linux/amd64 volumes: - ".:/code:delegated" command: bash -c "rm -rf /code/tmp/pids && bundle exec rails s -b 0.0.0.0" ports: - "3000:3000" depends_on: - db environment: &envs POINTS_DB_NAME: points-development POSTGRES_USER: postgres POSTGRES_PASSWORD: password POSTGRES_HOST: db stdin_open: true tty: true web-next: <<: *web command: bash -c "rm -rf /code/tmp/pids && bundle exec rails s -b 0.0.0.0" environment: <<: *envs BUNDLE_GEMFILE: Gemfile.next # Declare the volumes that our application uses. volumes: db_data: