Install Docker in step 1; document registry login in step 2
- install-rubix.sh: apt install docker.io and compose plugin, enable daemon - README: step 1 lists Docker install; step 2 keeps docker login before up.sh
This commit is contained in:
@@ -26,9 +26,9 @@ sudo ./install-rubix.sh
|
|||||||
|
|
||||||
The script will:
|
The script will:
|
||||||
|
|
||||||
1. Ask for your **Gitea token** (if `GITEA_TOKEN` is not already exported)
|
1. `apt update` / `upgrade`, install tools, **Docker** + compose plugin
|
||||||
2. Create **`/home/www/callcenter`**
|
2. Ask for your **Gitea token** (if `GITEA_TOKEN` is not already exported)
|
||||||
3. Download and unpack the latest **rubix** release there
|
3. Create **`/home/www/callcenter`** and download the latest **rubix** release
|
||||||
|
|
||||||
Optional: specific version `sudo ./install-rubix.sh v1.1.10`
|
Optional: specific version `sudo ./install-rubix.sh v1.1.10`
|
||||||
Optional: other path `sudo RUBIX_INSTALL_PATH=/opt/rubix ./install-rubix.sh`
|
Optional: other path `sudo RUBIX_INSTALL_PATH=/opt/rubix ./install-rubix.sh`
|
||||||
@@ -41,14 +41,12 @@ cp .env.example .env
|
|||||||
nano .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`.
|
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`.
|
||||||
|
|
||||||
Install Docker if not present:
|
Registry login before pull / `up.sh`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
apt-get install -y docker.io docker-compose-plugin
|
echo '<token>' | docker login gitea.dialer.work -u <gitea-user> --password-stdin
|
||||||
systemctl enable --now docker
|
|
||||||
echo '<token>' | docker login gitea.dialer.work -u <user> --password-stdin
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Start:
|
Start:
|
||||||
|
|||||||
+20
-2
@@ -24,6 +24,7 @@ GITEA_TOKEN="${GITEA_TOKEN:-${GITEA_REGISTRY_PULL_TOKEN:-}}"
|
|||||||
TAG="${1:-}"
|
TAG="${1:-}"
|
||||||
|
|
||||||
APT_PACKAGES=(unzip wget curl python3 ca-certificates git rsync)
|
APT_PACKAGES=(unzip wget curl python3 ca-certificates git rsync)
|
||||||
|
DOCKER_PACKAGES=(docker.io docker-compose-plugin)
|
||||||
|
|
||||||
prepare_system() {
|
prepare_system() {
|
||||||
if [[ "$(id -u)" -ne 0 ]]; then
|
if [[ "$(id -u)" -ne 0 ]]; then
|
||||||
@@ -43,6 +44,22 @@ prepare_system() {
|
|||||||
fi
|
fi
|
||||||
echo "[install-rubix] apt-get install ${APT_PACKAGES[*]} ..."
|
echo "[install-rubix] apt-get install ${APT_PACKAGES[*]} ..."
|
||||||
apt-get install -y "${APT_PACKAGES[@]}"
|
apt-get install -y "${APT_PACKAGES[@]}"
|
||||||
|
ensure_docker
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_docker() {
|
||||||
|
if command -v docker >/dev/null 2>&1; then
|
||||||
|
echo "[install-rubix] docker already installed: $(docker --version)"
|
||||||
|
else
|
||||||
|
echo "[install-rubix] apt-get install ${DOCKER_PACKAGES[*]} ..."
|
||||||
|
apt-get install -y "${DOCKER_PACKAGES[@]}"
|
||||||
|
fi
|
||||||
|
systemctl enable --now docker
|
||||||
|
if ! docker info >/dev/null 2>&1; then
|
||||||
|
echo "[install-rubix] ERROR: docker installed but daemon not running." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "[install-rubix] docker OK ($(docker compose version 2>/dev/null | head -1 || docker --version))"
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt_token() {
|
prompt_token() {
|
||||||
@@ -99,8 +116,9 @@ fi
|
|||||||
rm -f rubix.zip
|
rm -f rubix.zip
|
||||||
echo ""
|
echo ""
|
||||||
echo "[install-rubix] done — ${RUBIX_INSTALL_PATH} (${TAG})"
|
echo "[install-rubix] done — ${RUBIX_INSTALL_PATH} (${TAG})"
|
||||||
echo "[install-rubix] next (see rubix README step 2):"
|
echo "[install-rubix] next (see rubix-deploy README step 2):"
|
||||||
echo " cd ${RUBIX_INSTALL_PATH}/deploy/docker"
|
echo " cd ${RUBIX_INSTALL_PATH}/deploy/docker"
|
||||||
echo " cp .env.example .env"
|
echo " cp .env.example .env"
|
||||||
echo " nano .env"
|
echo " nano .env # set GITEA_REGISTRY_PULL_TOKEN, passwords, domains"
|
||||||
|
echo " # docker login before up.sh (see README step 2)"
|
||||||
echo " sudo ./up.sh"
|
echo " sudo ./up.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user