docker-compose.dev.yml
Rama master · réplica de lectura del repositorio original.
# vim: ft=yaml.docker-compose
services:
anthias-server:
# Explicit image tag so anthias-celery below can reference the same
# built image without a duplicate `build:` block (which would
# produce a separate, byte-identical-but-distinct image tag).
image: anthias-server:dev
build:
context: .
dockerfile: docker/Dockerfile.server
ports:
- 8000:8080
environment:
- HOME=/data
- LISTEN=0.0.0.0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- ENVIRONMENT=development
# So the chunked-upload path can be exercised in dev — set it in
# your shell before `docker compose up`. Empty means the 16 MB
# default, same as production.
- ANTHIAS_UPLOAD_CHUNK_SIZE_MB=${ANTHIAS_UPLOAD_CHUNK_SIZE_MB:-}
depends_on:
redis:
condition: service_healthy
restart: always
volumes:
- anthias-data:/data
- ./:/usr/src/app/
anthias-celery:
# Reuses anthias-server:dev via the explicit image tag above.
# Compose builds anthias-server first (it owns the build:) and
# this service inherits the same image, only overriding CMD.
image: anthias-server:dev
depends_on:
anthias-server:
condition: service_started
redis:
condition: service_healthy
command: >
nice -n 19 ionice -c 3
celery -A anthias_server.celery_tasks.celery worker -B -n worker@anthias
--loglevel=info --scheduler celery.beat.Scheduler
environment:
- HOME=/data
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- ENVIRONMENT=development
restart: always
volumes:
- anthias-data:/data
- ./:/usr/src/app/
redis:
platform: "linux/amd64"
image: mirror.gcr.io/library/redis:alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 12
start_period: 10s
volumes:
anthias-data:
redis-data: