/
AngelCareMe
/
task_queue
Обзор
Документация
Войти
/
AngelCareMe
/
task_queue
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docker/docker-compose.yml
116 строк
3 KB
AngelCareMe
done
28 июл 2025, 21:07
28 июл 2025, 21:07
c70014b
Код
Авторство
О чём код?
version: '3.8' services: # PostgreSQL database postgres: image: postgres:15-alpine container_name: task_queue_postgres environment: POSTGRES_DB: taskqueue POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres PGDATA: /var/lib/postgresql/data/pgdata ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./migrations:/docker-entrypoint-initdb.d healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped # Redis redis: image: redis:7-alpine container_name: task_queue_redis ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped # API service api: build: context: .. dockerfile: docker/api/Dockerfile container_name: task_queue_api ports: - "8080:8080" environment: - SERVER_PORT=8080 - DATABASE_HOST=postgres - DATABASE_PORT=5432 - DATABASE_USER=postgres - DATABASE_PASSWORD=postgres - DATABASE_NAME=taskqueue - DATABASE_SSLMODE=disable - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_PASSWORD= - REDIS_DB=0 depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped # Worker service worker: build: context: .. dockerfile: docker/worker/Dockerfile container_name: task_queue_worker environment: - SERVER_PORT=8080 - DATABASE_HOST=postgres - DATABASE_PORT=5432 - DATABASE_USER=postgres - DATABASE_PASSWORD=postgres - DATABASE_NAME=taskqueue - DATABASE_SSLMODE=disable - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_PASSWORD= - REDIS_DB=0 depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped # Adminer for database management (optional) adminer: image: adminer container_name: task_queue_adminer ports: - "8081:8080" depends_on: - postgres restart: unless-stopped # Redis Commander for Redis management (optional) redis-commander: image: rediscommander/redis-commander:latest container_name: task_queue_redis_commander environment: - REDIS_HOSTS=local:redis:6379 ports: - "8082:8081" depends_on: - redis restart: unless-stopped volumes: postgres_data: redis_data: