Docker Deployment
DevOps & Securitydocker-deploymentDocker 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
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
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
| File | Purpose |
|---|---|
docker-compose.yml | Development / local Compose stack |
deployment/docker-compose.yml | Production Compose stack |
deployment/env.sample | Sample production environment variables |
deployment/env.dev.sample | Sample development environment variables |
deployment/nginx/ | Nginx reverse-proxy configuration |
DEPLOYMENT.md | Step-by-step production deployment guide |
Services (Development Stack)
| Service | Image / Build | Role |
|---|---|---|
web | ./app (Dockerfile) | Django dev server on port 8000 |
worker | ./app (Dockerfile) | Celery task worker |
redis | redis:latest | Message broker and cache |
db | postgres:15 | PostgreSQL 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
| Aspect | Development (docker-compose.yml) | Production (deployment/docker-compose.yml) |
|---|---|---|
| Web server | Django runserver | Gunicorn behind host-level Nginx |
| Static files | Served by Django | Pre-built and served by Nginx |
| Env file | .env.dev | .env |
| Hot reload | Yes (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_URLEVY_SITE_URL(production only)
See DEPLOYMENT.md for the full production setup walkthrough, including Nginx, SSL (certbot), and backup configuration.