Sanitized mirror from private repository - 2026-04-18 11:19:59 UTC
This commit is contained in:
15
hosts/synology/calypso/retro-webhook/deploy.sh
Normal file
15
hosts/synology/calypso/retro-webhook/deploy.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Deploy script for retro.vish.gg
|
||||
# Runs inside the retro-webhook container via adnanh/webhook
|
||||
# Clones the latest retro_site repo into the running nginx container and reloads nginx.
|
||||
set -e
|
||||
echo "[deploy] Starting retro-site update $(date)"
|
||||
docker exec retro-site sh -c "
|
||||
rm -rf /tmp/deploy &&
|
||||
git clone --depth 1 https://REDACTED_TOKEN@git.vish.gg/Vish/retro_site.git /tmp/deploy &&
|
||||
cp -r /tmp/deploy/dist/* /usr/share/nginx/html/ &&
|
||||
cp /tmp/deploy/nginx.conf /etc/nginx/conf.d/default.conf &&
|
||||
nginx -s reload &&
|
||||
rm -rf /tmp/deploy &&
|
||||
echo '[deploy] Done'
|
||||
"
|
||||
35
hosts/synology/calypso/retro-webhook/docker-compose.yaml
Normal file
35
hosts/synology/calypso/retro-webhook/docker-compose.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
# retro-webhook - Auto-deploy listener for retro.vish.gg
|
||||
#
|
||||
# Receives Gitea push webhooks and updates the retro-site container
|
||||
# in-place via `docker exec` — no container restart required.
|
||||
#
|
||||
# Deploy pipeline:
|
||||
# git push Vish/retro_site
|
||||
# → Gitea webhook #19 → POST http://100.103.48.78:8027/hooks/retro-site-deploy
|
||||
# → deploy.sh: docker exec retro-site (git clone + cp dist/ + nginx reload)
|
||||
# → site live in ~9s
|
||||
#
|
||||
# Config files must exist on the host before starting:
|
||||
# /volume1/docker/retro-webhook/hooks.json (see hooks.json in this directory)
|
||||
# /volume1/docker/retro-webhook/deploy.sh (see deploy.sh in this directory)
|
||||
#
|
||||
# Setup:
|
||||
# mkdir -p /volume1/docker/retro-webhook
|
||||
# cp hooks.json deploy.sh /volume1/docker/retro-webhook/
|
||||
# chmod +x /volume1/docker/retro-webhook/deploy.sh
|
||||
# docker compose -f docker-compose.yaml up -d
|
||||
|
||||
services:
|
||||
retro-webhook:
|
||||
image: almir/webhook
|
||||
container_name: retro-webhook
|
||||
restart: unless-stopped
|
||||
user: root
|
||||
ports:
|
||||
- '8027:9000'
|
||||
volumes:
|
||||
- /volume1/docker/retro-webhook:/config:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# Synology docker binary is not in PATH; bind-mount it directly
|
||||
- /var/packages/REDACTED_APP_PASSWORD/target/usr/bin/docker:/usr/local/bin/docker:ro
|
||||
command: ["-verbose", "-hooks=/config/hooks.json", "-hotreload"]
|
||||
8
hosts/synology/calypso/retro-webhook/hooks.json
Normal file
8
hosts/synology/calypso/retro-webhook/hooks.json
Normal file
@@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"id": "retro-site-deploy",
|
||||
"execute-command": "/config/deploy.sh",
|
||||
"command-working-directory": "/",
|
||||
"response-message": "Deploy triggered\n"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user