57 lines
1.1 KiB
YAML
57 lines
1.1 KiB
YAML
services:
|
|
api:
|
|
build: .
|
|
ports:
|
|
- "8000:8000"
|
|
env_file: .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./plugins-contrib:/app/plugins-contrib:ro
|
|
|
|
worker:
|
|
build: .
|
|
command: ["arq", "proxy_pool.worker.settings.WorkerSettings"]
|
|
env_file: .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
migrate:
|
|
build: .
|
|
command: ["alembic", "upgrade", "head"]
|
|
env_file: .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
profiles:
|
|
- migrate
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: proxypool
|
|
POSTGRES_USER: proxypool
|
|
POSTGRES_PASSWORD: proxypool
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U proxypool"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 10 |