Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.32 KB

linux-deploy.md

File metadata and controls

49 lines (36 loc) · 1.32 KB

Linux deployment

Use generic sample values in public docs. Replace the placeholders below with values suitable for your host:

  • Service user: <service-user>
  • App: /srv/lan-math-solver
  • Runtime data: /var/lib/lan-math-solver
  • Environment: /etc/lan-math-solver.env
  • Service: lan-math-solver.service
  • Local listener example: http://127.0.0.1:8001

Steps

  1. Log in as the service user and configure Codex:

    codex login --with-api-key
    codex login status
  2. Install the app:

    sudo git clone https://github.com/<your-org-or-user>/lan-math-solver.git /srv/lan-math-solver
    sudo chown -R <service-user>:<service-user> /srv/lan-math-solver
    cd /srv/lan-math-solver
    python3 -m venv .venv
    .venv/bin/python -m pip install --upgrade pip
    .venv/bin/python -m pip install -r requirements.txt
  3. Create /etc/lan-math-solver.env from deploy/lan-math-solver.env.example.

  4. Install and start systemd:

    sudo cp deploy/lan-math-solver.service /etc/systemd/system/lan-math-solver.service
    sudo systemctl daemon-reload
    sudo systemctl enable --now lan-math-solver
    curl http://127.0.0.1:8001/health
  5. Add a Cloudflare Tunnel public hostname that points to:

    http://127.0.0.1:8001
    

Keep any unrelated existing service ports untouched.