Files

41 lines
860 B
Markdown
Raw Permalink Normal View History

# Deploy Phoenix Deploy API
## Local run (no install)
From this directory:
```bash
npm install
cp .env.example .env # then set GITEA_TOKEN
npm start
```
## Install as systemd service (production)
1. **From this repo** (dependencies already installed in repo):
```bash
sudo ./scripts/install-systemd.sh
```
Or from repo root:
```bash
sudo phoenix-deploy-api/scripts/install-systemd.sh
```
2. **Edit env** on the server:
```bash
sudo nano /opt/phoenix-deploy-api/.env
# Set GITEA_TOKEN=... and optionally PHOENIX_DEPLOY_SECRET
sudo systemctl restart phoenix-deploy-api
```
3. **Check**: `curl http://localhost:4001/health`
## If you don't have sudo
- Run in project dir: `npm install && npm start` (or use PM2/screen).
- To install to `/opt` and systemd, run `install-systemd.sh` on a host where you have sudo.