SET 2 DJANGO READY

myapp_django

Cafe24 Dev Language VPS starter environment

Runtime
Python 3.12
Framework
Django + Gunicorn
Database
PostgreSQL 17
Process
systemd

Start Building (Quickstart)

  1. SSH: ssh root@172.233.72.10
  2. Upload code via SFTP / FileZilla / Cyberduck: host=172.233.72.10, user=root, target=/opt/myapp_django/
  3. Ownership: chown -R appuser:appuser /opt/myapp_django
  4. Install: sudo -iu appusercd /opt/myapp_djangouv syncuv run python manage.py migrateuv run python manage.py collectstatic --noinput
  5. Restart: exitsystemctl restart myapp_django

Operate (root)

Service statussystemctl status myapp_django
App logsjournalctl -u myapp_django -f
Admin URLhttps://mxbhkimtest0422django.mycafe24.com/admin/
DB envsudo cat /etc/myapp_django/env

Reference (paths & configs)

RuntimePython 3.12 (system) with uv (Astral) for project envs.
Build tooluv sync / uv add by default. pip + venv also works: python -m venv .venv then source .venv/bin/activate.
Django project/opt/myapp_django/myapp_django/ (settings.py, urls.py, wsgi.py). manage.py at /opt/myapp_django/manage.py.
Settings/opt/myapp_django/myapp_django/settings.py
Service file/etc/systemd/system/myapp_django.service (User=appuser, WorkingDirectory=/opt/myapp_django)
ExecStartuv run --directory /opt/myapp_django gunicorn -c /opt/myapp_django/gunicorn.conf.py myapp_django.wsgi:application
Gunicorn config/opt/myapp_django/gunicorn.conf.py (workers=2, threads=2, bind 127.0.0.1:8000)
DB env file/etc/myapp_django/env — loaded by systemd via EnvironmentFile=; read in settings.py via os.environ (DATABASE_URL).
Static filescollectstatic writes to STATIC_ROOT in settings.py. Nginx serves /static/ directly when configured.
App port8000 (Gunicorn bind). Nginx reverse-proxies :80 / :443 → :8000.
Logsjournalctl -u myapp_django -f (Gunicorn stdout). Access/error logs also under /var/log/myapp_django/ per gunicorn.conf.py.
Redeployupload new source → sudo -iu appusercd /opt/myapp_djangouv syncuv run python manage.py migrateuv run python manage.py collectstatic --noinput → exit → systemctl restart myapp_django