OpenParable
Skip to content
← Back to skills

Docker Deployment

DevOps & Security
docker-deployment

Docker Deployment is an Agent Skill for devops & security published in the fossasia/eventyay repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Docker Compose, container services, deployment

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/fossasia/eventyay/blob/HEAD/.agents/skills/docker-deployment/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/docker-deployment, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Skill: Docker Deployment

Key Files

FilePurpose
docker-compose.ymlDevelopment / local Compose stack
deployment/docker-compose.ymlProduction Compose stack
deployment/env.sampleSample production environment variables
deployment/env.dev.sampleSample development environment variables
deployment/nginx/Nginx reverse-proxy configuration
DEPLOYMENT.mdStep-by-step production deployment guide

Services (Development Stack)

ServiceImage / BuildRole
web./app (Dockerfile)Django dev server on port 8000
worker./app (Dockerfile)Celery task worker
redisredis:latestMessage broker and cache
dbpostgres:15PostgreSQL database

Building and Running (Development)

# Copy and edit environment variables
cp deployment/env.dev.sample .env.dev

# Build images and start all services
docker compose up --build

# Run with detached containers
docker compose up -d --build

# View logs
docker compose logs -f web
docker compose logs -f worker

# Stop all services
docker compose down

Running a Management Command Inside a Container

docker compose exec web python manage.py migrate
docker compose exec web python manage.py create_admin_user

Use create_admin_user as the default onboarding command for least-privilege admin setup. Use createsuperuser only when full superuser access is explicitly required.

Development vs Production

AspectDevelopment (docker-compose.yml)Production (deployment/docker-compose.yml)
Web serverDjango runserverGunicorn behind host-level Nginx
Static filesServed by DjangoPre-built and served by Nginx
Env file.env.dev.env
Hot reloadYes (volume mount)No

Environment Variables

Required variables are documented in deployment/env.sample and deployment/env.dev.sample. At minimum, set:

  • EVY_SECRET_KEY
  • individual EVY_POSTGRES_* vars
  • EVY_REDIS_URL
  • EVY_SITE_URL (production only)

See DEPLOYMENT.md for the full production setup walkthrough, including Nginx, SSL (certbot), and backup configuration.