Generate complete Docker configuration for full-stack application
Generates complete Docker configuration for full-stack applications with production-ready services and monitoring.
/plugin marketplace add adelabdelgawad/full-stack/plugin install docker-stack@full-stackIMPORTANT: When this command is invoked, you MUST create all the files listed below. Do NOT just describe what should be done - actually create the files.
First, scan the project to identify:
1. Find backend directory: Look for pyproject.toml, requirements.txt, main.py
2. Find frontend directory: Look for package.json with next/react
3. Determine project name from directory name or package.json
Use Glob and Read tools to detect the structure.
Create these directories at the PROJECT ROOT (not in src/):
docker/
├── env/
├── nginx/
├── monitoring/
│ ├── prometheus/
│ └── grafana/
│ └── provisioning/
│ ├── datasources/
│ └── dashboards/
│ └── dashboards/
└── scripts/
You MUST create ALL of the following files. Read the templates from this plugin and customize them with the detected project values.
Read template from: templates/compose/docker-compose.prod.yml.template
Replace placeholders:
{{PROJECT_NAME}} → detected project name (lowercase, hyphenated){{BACKEND_PATH}} → relative path from docker/ to backend (e.g., ../../src/backend){{FRONTEND_PATH}} → relative path from docker/ to frontend (e.g., ../../src/frontend)Read template from: templates/nginx/nginx.conf.template
Replace {{PROJECT_NAME}} with project name.
Read template from: templates/dockerfiles/nginx.Dockerfile
Copy as-is.
Read template from: templates/env/.env.example.backend.template
Replace:
{{DB_USER}} → {project_name}_user{{DB_NAME}} → {project_name}_dbRead template from: templates/env/.env.example.database.template
Replace:
{{DB_USER}} → {project_name}_user{{DB_NAME}} → {project_name}_dbRead template from: templates/env/.env.example.redis.template
Copy as-is.
Read template from: templates/env/.env.example.frontend.template
Copy as-is.
Read template from: templates/env/.env.example.grafana.template
Copy as-is.
Create with content:
# Ignore actual env files, keep examples
.env.*
!.env.example.*
Read template from: templates/monitoring/prometheus/prometheus.yml.template
Copy as-is.
Read template from: templates/monitoring/grafana/provisioning/datasources/prometheus.yml.template
Copy as-is.
Read template from: templates/monitoring/grafana/provisioning/dashboards/dashboard_config.yml.template
Copy as-is.
If {backend_path}/Dockerfile doesn't exist, read template from: templates/dockerfiles/python-fastapi.Dockerfile
If {frontend_path}/Dockerfile doesn't exist, read template from: templates/dockerfiles/nextjs.Dockerfile
Create a README explaining how to use the Docker setup:
Create at project root if not exists:
.git
.gitignore
*.md
.env*
__pycache__
*.pyc
node_modules
.next
After creating all files, output:
✅ Docker configuration scaffolded successfully!
Created files:
- docker/docker-compose.prod.yml
- docker/nginx/nginx.conf
- docker/nginx/Dockerfile
- docker/env/.env.example.* (5 files)
- docker/monitoring/prometheus/prometheus.yml
- docker/monitoring/grafana/provisioning/* (2 files)
- docker/README.md
Project: {project_name}
Backend: {backend_path}
Frontend: {frontend_path}
Next steps:
1. cd docker/env && cp .env.example.backend .env.backend
2. Edit .env files with your credentials
3. cd docker && docker-compose -f docker-compose.prod.yml up -d --build
All templates are in this plugin at:
templates/compose/docker-compose.prod.yml.templatetemplates/nginx/nginx.conf.templatetemplates/dockerfiles/*.Dockerfiletemplates/env/.env.example.*.templatetemplates/monitoring/**/*.templateThis command MUST:
DO NOT just output instructions. CREATE THE FILES.