TransWorker/docker-compose.yml

24 lines
676 B
YAML

version: "3.8"
services:
worker:
build: .
container_name: image_worker
command: python worker.py --concurrency 2 --redis-url redis://host.docker.internal:6379/0
volumes:
- ./modules:/worker/modules
- ./models:/worker/models
- ./temp:/worker/temp
environment:
- REDIS_URL=redis://host.docker.internal:6379/0
- MAIN_SERVER_HOST=host.docker.internal
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
# 로컬에서 Redis가 필요한 경우 (메인서버와 분리된 환경)
# redis:
# image: redis:6.2
# container_name: worker_redis
# ports:
# - "6380:6379"