ecae54e70e
- Update README section 2 to state DNS A/AAAA record alignment while editing .env - Reduce setup ambiguity by tying domain host values and DNS changes to the same step
93 lines
2.4 KiB
Markdown
93 lines
2.4 KiB
Markdown
# rubix-deploy
|
|
|
|
New Rubix server — full install flow.
|
|
|
|
**Repository:** https://gitea.dialer.work/swissdatabase/rubix-deploy
|
|
App releases: https://gitea.dialer.work/swissdatabase/rubix/releases
|
|
|
|
## 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 \
|
|
https://gitea.dialer.work/swissdatabase/rubix-deploy/raw/branch/main/install-rubix.sh
|
|
chmod +x install-rubix.sh
|
|
sudo ./install-rubix.sh
|
|
```
|
|
|
|
The script will:
|
|
|
|
1. `apt update` / `upgrade`, install tools, **Docker** (`docker.io`) + Compose v2 plugin (apt or GitHub on Debian)
|
|
2. Ask for your **Gitea token** (if `GITEA_TOKEN` is not already exported)
|
|
3. Create **`/home/www/callcenter`** and download the latest **rubix** release
|
|
|
|
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
|
|
|
|
While editing `.env`, set your domain values (`RUBIX_DOMAIN_CMS`, API/DB/Mail hosts, aliases) and make sure DNS A/AAAA records for those hosts point to this server (manage records at your registrar/DNS provider).
|
|
|
|
```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), `GITEA_REGISTRY_PULL_USER`, `MYSQL_ROOT_PASSWORD`, DB users/passwords, `COMPOSE_PROFILES`, domains, `RUBIX_STORAGE_ROOT`.
|
|
|
|
Registry login before pull / `up.sh`:
|
|
|
|
```bash
|
|
echo '<token>' | docker login gitea.dialer.work -u <gitea-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
|
|
```
|