2025-01-22 17:58:25 +08:00
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
services:
|
|
|
|
web:
|
|
|
|
image: songtianlun/today_ai_weather:latest
|
|
|
|
ports:
|
2025-01-23 10:18:49 +08:00
|
|
|
- "3000:3000"
|
2025-01-22 17:58:25 +08:00
|
|
|
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:
|
2025-01-23 10:11:39 +08:00
|
|
|
- ../taw_data/pg:/var/lib/postgresql/data
|
2025-01-22 17:58:25 +08:00
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=xxx
|
|
|
|
- POSTGRES_DB=db
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:7-alpine
|
|
|
|
volumes:
|
2025-01-23 10:13:45 +08:00
|
|
|
- ../taw_data/redis:/data
|
2025-01-22 17:58:25 +08:00
|
|
|
command: redis-server --appendonly yes
|