diff --git a/.gitea/workflows/deploy-nginx.yml b/.gitea/workflows/deploy-nginx.yml index 5525085..b466749 100644 --- a/.gitea/workflows/deploy-nginx.yml +++ b/.gitea/workflows/deploy-nginx.yml @@ -13,6 +13,6 @@ jobs: - name: Deploy via SSH run: | mkdir -p ~/.ssh - echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy_key + echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key chmod 600 ~/.ssh/deploy_key ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/deploy_key deploy@${{ secrets.DEPLOY_HOST }} deploy-nginx diff --git a/.gitea/workflows/deploy-timothykim.yml b/.gitea/workflows/deploy-timothykim.yml index fc24a59..1a909ad 100644 --- a/.gitea/workflows/deploy-timothykim.yml +++ b/.gitea/workflows/deploy-timothykim.yml @@ -13,6 +13,6 @@ jobs: - name: Deploy via SSH run: | mkdir -p ~/.ssh - echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy_key + echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key chmod 600 ~/.ssh/deploy_key ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/deploy_key deploy@${{ secrets.DEPLOY_HOST }} deploy-timothykim.net diff --git a/README.md b/README.md index 902e839..1d4e14c 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ On a fresh Rocky Linux 9 (or compatible) install: ```bash dnf install -y git -git clone https://git.timothykim.net/timothykim/hantim-server.git /opt/hantim +git clone https://git.timothykim.net/hantim/hantim-server.git /opt/hantim bash /opt/hantim/setup.sh ``` @@ -84,8 +84,9 @@ After running the script: Nginx Proxy Manager certs and Let's Encrypt account keys are encrypted with git-crypt (see `.gitattributes`). You need the git-crypt key to unlock them. -The following secrets must be configured in the Gitea repo settings for -deploys to work: +The following secrets must be configured in the `hantim` Gitea org settings +(Settings > Actions > Secrets) and are shared across all repos: - `DEPLOY_HOST` -- the server's IP or hostname -- `DEPLOY_KEY` -- the SSH private key for the `deploy` user +- `DEPLOY_SSH_KEY` -- the SSH private key for the `deploy` user +- `REGISTRY_TOKEN` -- Gitea personal access token for Docker registry login diff --git a/docker/timothykim.net/compose.yml b/docker/timothykim.net/compose.yml index 05e1ad3..5803f60 100644 --- a/docker/timothykim.net/compose.yml +++ b/docker/timothykim.net/compose.yml @@ -1,6 +1,6 @@ services: static: - image: git.timothykim.net/timothykim/static:latest + image: git.timothykim.net/hantim/static:latest restart: unless-stopped container_name: timothykim networks: diff --git a/scripts/new-app.sh b/scripts/new-app.sh index ab8571e..f7ab45d 100755 --- a/scripts/new-app.sh +++ b/scripts/new-app.sh @@ -26,7 +26,7 @@ mkdir -p "$REPO_ROOT/docker/$APP" cat > "$REPO_ROOT/docker/$APP/compose.yml" < ~/.ssh/deploy_key + echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key chmod 600 ~/.ssh/deploy_key ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/deploy_key deploy@${{ secrets.DEPLOY_HOST }} deploy-APP_PLACEHOLDER OUTER diff --git a/setup.sh b/setup.sh index 574c6fb..ff53003 100755 --- a/setup.sh +++ b/setup.sh @@ -7,7 +7,7 @@ set -euo pipefail # # Usage: # 1. dnf install -y git -# 2. git clone https://git.timothykim.net/timothykim/hantim-server.git /opt/hantim +# 2. git clone https://git.timothykim.net/hantim/hantim-server.git /opt/hantim # 3. bash /opt/hantim/setup.sh # @@ -22,7 +22,7 @@ fi if [ "$(dirname "$(readlink -f "$0")")" != "$REPO_DIR" ]; then echo "ERROR: Repo does not appear to be cloned to $REPO_DIR." - echo " git clone https://git.timothykim.net/timothykim/hantim-server.git $REPO_DIR" + echo " git clone https://git.timothykim.net/hantim/hantim-server.git $REPO_DIR" exit 1 fi