version: "3.8" x-app: &app build: args: RUBY_VERSION: "3.0.2-apline" context: . dockerfile: Dockerfile.dev depends_on: - db - redis environment: - DATABASE_URL=postgres://postgres:postgres@db:5432 stdin_open: true tty: true volumes: - .:/app:cached - bundle:/usr/local/bundle - node_modules:/app/node_modules services: db: environment: - POSTGRES_PASSWORD=postgres image: postgresql:14-alpine ports: - 5432 restart: always volumes: - postgres:/var/lib/postgresql/data redis: image: redis:alpine restart: always web: <<: *app command: rails s -b 0.0.0.0 ports: - 3000:3000 css: <<: *app command: yarn build:css --watch js: <<: *app command: yarn build --watch volumes: bundle: node_modules: postgres: