today_ai_weather/compose.yaml
songtianlun 2bcfea30ee feat: add background job processing with Sidekiq
- Implement BatchGenerateWeatherArtsWorker to handle batch
  processing of weather art generation.
- Create GenerateWeatherArtWorker for individual weather art
  generation tasks.
- Update Dockerfile to include redis-tools for Sidekiq support.
- Modify Gemfile to add sidekiq and sidekiq-scheduler gems.
- Configure Sidekiq in initializers and set up routes for
  Sidekiq dashboard.
- Include a sidekiq.yml configuration for scheduling jobs.
- Create compose.yaml for Docker services including web,
  database, Redis, and Sidekiq workers.

These changes introduce background processing capabilities
using Sidekiq, allowing for efficient generation of weather
art through scheduled and managed job queues, optimizing
performance and scalability.
2025-01-22 17:58:25 +08:00

41 lines
903 B
YAML

version: '3.8'
services:
web:
image: songtianlun/today_ai_weather:latest
ports:
- "2222:3000"
environment:
- RAILS_ENV=production
- DATABASE_URL=postgresql://postgres:xxx@db:5432/db
- RAILS_MASTER_KEY=xxx
- REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
sidekiq:
image: songtianlun/today_ai_weather:latest
command: bundle exec sidekiq
environment:
- RAILS_ENV=production
- DATABASE_URL=postgresql://postgres:xxx@db:5432/db
- RAILS_MASTER_KEY=xxx
- REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
db:
image: postgres:16
volumes:
- ./data/pg:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=xxx
- POSTGRES_DB=db
redis:
image: redis:7-alpine
volumes:
- ./data/redis:/data
command: redis-server --appendonly yes