services: db: image: postgres:16 ports: - "${POSTGRES_PORT:-5432}:5432" environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: stemplin_development volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine ports: - "${REDIS_PORT:-6379}:6379" volumes: - redis_data:/data web: image: kaosper/stemplin:latest command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails db:prepare && bundle exec rails assets:precompile && bundle exec rails server -b 0.0.0.0 -e production" volumes: - .:/app ports: - "${WEB_PORT:-3000}:3000" depends_on: db: condition: service_healthy redis: condition: service_started environment: RAILS_ENV: production DATABASE_URL: postgres://postgres:postgres@db:5432/stemplin_development REDIS_URL: redis://redis:6379/0 SECRET_KEY_BASE: ${SECRET_KEY_BASE:-change_this_to_a_secure_secret_key} stdin_open: true tty: true sidekiq: image: kaosper/stemplin:latest command: bundle exec sidekiq volumes: - .:/app depends_on: db: condition: service_healthy redis: condition: service_started environment: RAILS_ENV: production DATABASE_URL: postgres://postgres:postgres@db:5432/stemplin_development REDIS_URL: redis://redis:6379/0 SECRET_KEY_BASE: ${SECRET_KEY_BASE:-change_this_to_a_secure_secret_key} volumes: postgres_data: redis_data: