conflictData / docker-compose.yml
Hardik Singh
Initial commit of ConflictIQ v2.0 - Render Ready
f50a610
Raw History Blame Contribute Delete
1.34 kB
version: '3.9'
services:
postgres:
image: postgis/postgis:15-3.3
environment:
POSTGRES_DB: conflictiq
POSTGRES_USER: ciq
POSTGRES_PASSWORD: ciq_password
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ['CMD-SHELL','pg_isready -U ciq']
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru
api:
build: .
command: uvicorn api.main:app --host 0.0.0.0 --port 8000 --workers 4
ports:
- '8000:8000'
environment:
- DATABASE_URL=postgresql+asyncpg://ciq:ciq_password@postgres:5432/conflictiq
- REDIS_URL=redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
restart: always
poller:
build: .
command: python -m poller.scheduler
environment:
- DATABASE_URL=postgresql+asyncpg://ciq:ciq_password@postgres:5432/conflictiq
depends_on:
postgres:
condition: service_healthy
restart: always
nginx:
image: nginx:alpine
ports:
- '80:80'
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- api
volumes:
pgdata: {}