SET 1 FASTAPI READY

mxbhkimtest0427fastapimariadb

Cafe24 Dev Language VPS starter environment

Runtime
Python 3.12
Framework
FastAPI + Uvicorn
Database
MariaDB 11.4
Process
systemd

Start Building (Quickstart)

  1. SSH: ssh root@172.233.76.212
  2. Upload code via SFTP / FileZilla / Cyberduck: host=172.233.76.212, user=root, target=/opt/mxbhkimtest0427fastapimariadb/
  3. Ownership: chown -R appuser:appuser /opt/mxbhkimtest0427fastapimariadb
  4. Install: sudo -iu appusercd /opt/mxbhkimtest0427fastapimariadbuv sync
  5. Restart: exitsystemctl restart mxbhkimtest0427fastapimariadb

Operate (root)

Service statussystemctl status mxbhkimtest0427fastapimariadb
App logsjournalctl -u mxbhkimtest0427fastapimariadb -f
Healthcurl http://127.0.0.1:8000/health
DB envsudo cat /etc/mxbhkimtest0427fastapimariadb/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.
Entry point/opt/mxbhkimtest0427fastapimariadb/main.py — FastAPI app instance: app = FastAPI(...)
Service file/etc/systemd/system/mxbhkimtest0427fastapimariadb.service (User=appuser, WorkingDirectory=/opt/mxbhkimtest0427fastapimariadb)
ExecStartuv run --directory /opt/mxbhkimtest0427fastapimariadb uvicorn main:app --host 127.0.0.1 --port 8000 --workers 2
DB env file/etc/mxbhkimtest0427fastapimariadb/env — loaded into systemd via EnvironmentFile=; read at runtime via os.environ.
App port8000 (FastAPI/Uvicorn). Nginx reverse-proxies :80 / :443 → :8000.
Logsjournalctl -u mxbhkimtest0427fastapimariadb -f (no separate log file by default)
Redeployupload new source → sudo -iu appusercd /opt/mxbhkimtest0427fastapimariadbuv sync → exit → systemctl restart mxbhkimtest0427fastapimariadb