Dev Snippet Generator

Stateless generator — no uploads, no server disk writes. Share via URL.
Back to tools
How to use
  1. Choose stack/options on the left.
  2. Click Generate to update snippets.
  3. Use Copy or Download (download happens in your browser only).
  4. Share the URL — it recreates the same output.
Choosing a preset reloads the page with parameters (no server storage).
Used for Django/FastAPI Dockerfile + CI.
Used for Nginx config.
Docker mode also adds the nginx service to docker-compose.
Generator stays stateless; SSL notes only.
Reset
✅ Server does not store your configs. Output is generated from query parameters.
version: "3.9"

services:
  web:
    build: .
    container_name: app_web
    env_file: .env
    depends_on:
      - db
    command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
    ports:
      - "8000:8000"

  db:
    image: postgres:16-alpine
    container_name: app_db
    environment:
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    ports:
      - "5432:5432"
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:
Active: docker-compose.yml
Tip: share this page URL to share the exact config.
Deployment help
Quick steps (copy/paste friendly)

2) Environment
Copy .env.example to .env and set: SECRET_KEY, DEBUG=0, ALLOWED_HOSTS, DATABASE_URL (if Postgres), REDIS_URL (if Celery/Redis).
3) Migrate + collectstatic
source venv/bin/activate python manage.py migrate python manage.py collectstatic --noinput
4) systemd services
Copy:
  • deploy/systemd/gunicorn.service/etc/systemd/system/mofidtech_app.gunicorn.service
  • If Celery enabled: deploy/systemd/celery.service/etc/systemd/system/mofidtech_app.celery.service
sudo systemctl daemon-reload sudo systemctl enable mofidtech_app.gunicorn sudo systemctl start mofidtech_app.gunicorn
5) Nginx host config
Use the generated nginx/nginx.conf as template:
sudo cp nginx/nginx.conf /etc/nginx/sites-available/mofidtech_app
                sudo ln -s /etc/nginx/sites-available/mofidtech_app /etc/nginx/sites-enabled/mofidtech_app
                sudo nginx -t && sudo systemctl reload nginx
6) SSL
If you selected LetsEncrypt notes, open nginx/README-ssl.md.

1) Create folder & venv
sudo mkdir -p /var/www/mofidtech_app
                sudo chown -R $USER:$USER /var/www/mofidtech_app
                cd /var/www/mofidtech_app

                python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
2) systemd
  • deploy/systemd/uvicorn.service/etc/systemd/system/mofidtech_app.uvicorn.service
sudo systemctl daemon-reload sudo systemctl enable mofidtech_app.uvicorn sudo systemctl start mofidtech_app.uvicorn
3) Nginx
Use nginx/nginx.conf as template (proxy to 127.0.0.1:8000).