Docker Compose
Services
Section titled “Services”The docker-compose.yml defines 5 services:
| Service | Image | Port | Description |
|---|---|---|---|
| db | postgres:15-alpine | 5432 | PostgreSQL database |
| redis | redis:7-alpine | 6379 | Message broker + channel layer |
| web | Build from Dockerfile | 8000 | Daphne ASGI server |
| celery | Build from Dockerfile | — | Background task worker |
| celery-beat | Build from Dockerfile | — | Periodic task scheduler |
Quick Start
Section titled “Quick Start”# Clone and configuregit clone https://github.com/JINA-CODE-SYSTEMS/jina-connect-unified-cpaas.gitcd jina-connect-unified-cpaascp .env.example .env# Edit .env with your SECRET_KEY and FIELD_ENCRYPTION_KEY
# Start everythingdocker compose up -d
# Create admin userdocker compose exec web python manage.py createsuperuserDockerfile
Section titled “Dockerfile”The production image is based on python:3.13-slim:
FROM python:3.13-slim
# System dependenciesRUN apt-get update && apt-get install -y \ build-essential libpq-dev libjpeg62-turbo-dev zlib1g-dev
# Python dependenciesCOPY requirements.txt .RUN pip install -r requirements.txt
# Application codeCOPY . /appWORKDIR /app
# Collect static filesRUN python manage.py collectstatic --noinput
# ASGI server (HTTP + WebSocket)CMD ["daphne", "-b", "0.0.0.0", "-p", "8000", "jina_connect.routing:application"]Environment Overrides
Section titled “Environment Overrides”Docker Compose automatically overrides these for inter-service networking:
environment: - DB_HOST=db - CELERY_BROKER_URL=redis://redis:6379/0 - REDIS_URL=redis://redis:6379/0Data Persistence
Section titled “Data Persistence”PostgreSQL data is persisted via a Docker volume:
volumes: postgres_data:Common Operations
Section titled “Common Operations”# View logsdocker compose logs -f web
# Run migrationsdocker compose exec web python manage.py migrate
# Django shelldocker compose exec web python manage.py shell
# Restart a specific servicedocker compose restart celery
# Rebuild after code changesdocker compose up -d --build web celery celery-beat
# Stop everythingdocker compose down
# Stop and remove volumes (DESTRUCTIVE)docker compose down -vHealth Checks
Section titled “Health Checks”# Check if web is respondingcurl http://localhost:8000/version/
# Check all service statusdocker compose ps