cojedzie: Add Redis and run three workers in production
This commit is contained in:
parent
3624478d83
commit
103af41568
@ -44,8 +44,25 @@ services:
|
||||
COJEDZIE_WORKER_OPTS: '-vv'
|
||||
COJEDZIE_WORKER_QUEUES: 'scheduler_default scheduler_hub scheduler_recorder'
|
||||
|
||||
# import jobs run in parallel on every worker (cojedzie ADR 0026)
|
||||
worker:
|
||||
<<: *worker
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: {{ cojedzie_worker_replicas|default(3) }}
|
||||
|
||||
# state the workers share, e.g. the Sentry check-ins of running imports; reached only inside the stack
|
||||
redis:
|
||||
image: redis:{{ cojedzie_redis_version|default('7.4-alpine') }}
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
resources:
|
||||
limits:
|
||||
memory: 128M
|
||||
|
||||
# departure history (cojedzie ADR 0020); reached only inside the stack
|
||||
clickhouse:
|
||||
@ -128,3 +145,4 @@ volumes:
|
||||
clickhouse_data: ~
|
||||
mercure_data: ~
|
||||
mercure_config: ~
|
||||
redis_data: ~
|
||||
|
||||
@ -12,3 +12,6 @@ SENTRY_SAMPLE_RATE={{ sentry_sample_rate_api }}
|
||||
# departure history; see cojedzie's contrib/agents/wiki/api/departure-history.md
|
||||
COJEDZIE_CLICKHOUSE_URL=http://cojedzie:{{ cojedzie_clickhouse_password | urlencode }}@clickhouse:8123/cojedzie
|
||||
COJEDZIE_DEPARTURE_HISTORY_RETENTION_DAYS={{ cojedzie_departure_history_retention_days }}
|
||||
|
||||
# state shared by workers, e.g. Sentry check-ins of running imports
|
||||
COJEDZIE_REDIS_URL=redis://redis:6379
|
||||
|
||||
Loading…
Reference in New Issue
Block a user