Add bootstrap-vps-ssh and full server install README
- Move SSH bootstrap from rubix; wget from public rubix-deploy on PC - README steps 0–5 and updates match former rubix install flow
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
# rubix-deploy
|
||||
|
||||
Bootstrap **step 1** for new Rubix servers (install app from Gitea release).
|
||||
New Rubix server — full install flow.
|
||||
|
||||
**Repository:** https://gitea.dialer.work/swissdatabase/rubix-deploy
|
||||
**Clone:** `git clone https://gitea.dialer.work/swissdatabase/rubix-deploy.git`
|
||||
App releases: https://gitea.dialer.work/swissdatabase/rubix/releases
|
||||
|
||||
## On a new VPS
|
||||
## 0) SSH on a new VPS (from your PC)
|
||||
|
||||
```bash
|
||||
wget -O bootstrap-vps-ssh.sh \
|
||||
https://gitea.dialer.work/swissdatabase/rubix-deploy/raw/branch/main/bootstrap-vps-ssh.sh
|
||||
chmod +x bootstrap-vps-ssh.sh
|
||||
./bootstrap-vps-ssh.sh
|
||||
ssh <your-host-alias>
|
||||
```
|
||||
|
||||
## 1) Download Rubix (on the VPS)
|
||||
|
||||
```bash
|
||||
wget -O install-rubix.sh \
|
||||
@@ -14,6 +24,69 @@ chmod +x install-rubix.sh
|
||||
sudo ./install-rubix.sh
|
||||
```
|
||||
|
||||
The script: `apt update` + `apt upgrade`, installs tools, asks for token, creates `/home/www/callcenter`, downloads **rubix**.
|
||||
The script will:
|
||||
|
||||
**Step 2+** (`.env`, Docker, `up.sh`): [swissdatabase/rubix](https://gitea.dialer.work/swissdatabase/rubix) README.
|
||||
1. Ask for your **Gitea token** (if `GITEA_TOKEN` is not already exported)
|
||||
2. Create **`/home/www/callcenter`**
|
||||
3. Download and unpack the latest **rubix** release there
|
||||
|
||||
Optional: specific version `sudo ./install-rubix.sh v1.1.10`
|
||||
Optional: other path `sudo RUBIX_INSTALL_PATH=/opt/rubix ./install-rubix.sh`
|
||||
|
||||
## 2) Configure `.env` and start stack
|
||||
|
||||
```bash
|
||||
cd /home/www/callcenter/deploy/docker
|
||||
cp .env.example .env
|
||||
nano .env
|
||||
```
|
||||
|
||||
Set at least: `GITEA_REGISTRY_PULL_TOKEN` (same token as step 1), `MYSQL_ROOT_PASSWORD`, DB users/passwords, `COMPOSE_PROFILES`, domains, `RUBIX_STORAGE_ROOT`.
|
||||
|
||||
Install Docker if not present:
|
||||
|
||||
```bash
|
||||
apt-get install -y docker.io docker-compose-plugin
|
||||
systemctl enable --now docker
|
||||
echo '<token>' | docker login gitea.dialer.work -u <user> --password-stdin
|
||||
```
|
||||
|
||||
Start:
|
||||
|
||||
```bash
|
||||
cd /home/www/callcenter/deploy/docker
|
||||
sudo ./up.sh
|
||||
```
|
||||
|
||||
Single service: `sudo ./up.sh mysql` / `cms` / `asterisk`
|
||||
|
||||
## 3) SQL migrations (fresh database)
|
||||
|
||||
```bash
|
||||
cd /home/www/callcenter/deploy
|
||||
sudo RUBIX_MYSQL_VIA_DOCKER=1 MYSQL_DOCKER_CONTAINER=rubix-mysql \
|
||||
./apply_sql_migrations.sh
|
||||
```
|
||||
|
||||
Use your `RUBIX_MYSQL_CONTAINER` from `.env`. Existing server: restore MySQL datadir under `RUBIX_MYSQL_DATA` instead.
|
||||
|
||||
## 4) CMS HTTPS (when DNS is ready)
|
||||
|
||||
```bash
|
||||
cd /home/www/callcenter/deploy/docker
|
||||
docker-cms-certbot
|
||||
```
|
||||
|
||||
## 5) Dialer
|
||||
|
||||
```bash
|
||||
docker-asterisk
|
||||
/etc/init.d/callcenter2 restart
|
||||
```
|
||||
|
||||
## Updates (app already installed)
|
||||
|
||||
```bash
|
||||
cd /home/www/callcenter/deploy
|
||||
./rubix_deploy_from_release.sh vX.Y.Z
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user