refactor(tubarao):server right-sizing
This commit is contained in:
2 files changed
+50
-18
No files matched your search
+30
-14
@@ -89,22 +89,38 @@ steps:
|
||||
- status: [failure]
|
||||
|
||||
- name: Trigger Dockhand stack redeploy
|
||||
image: curlimages/curl:latest
|
||||
image: alpine:3.22
|
||||
environment:
|
||||
WEBHOOK_URL:
|
||||
from_secret: dockhand_webhook_url
|
||||
DOCKHAND_WEBHOOK_URL:
|
||||
from_secret: dockhand_webhook_url
|
||||
DOCKHAND_WEBHOOK_SECRET:
|
||||
from_secret: dockhand_webhook_secret
|
||||
commands:
|
||||
- set -e
|
||||
- echo "=== Triggering Portainer stack redeploy ==="
|
||||
- |
|
||||
resp=$(curl -s -w "\n%{http_code}" -X POST "$WEBHOOK_URL")
|
||||
body=$(echo "$resp" | head -n -1)
|
||||
code=$(echo "$resp" | tail -n 1)
|
||||
if [ "$code" != "200" ] && [ "$code" != "204" ]; then
|
||||
echo "Webhook failed (HTTP $code): $body"
|
||||
exit 1
|
||||
fi
|
||||
echo "✓ Portainer redeploy triggered (HTTP $code)"
|
||||
- apk add --no-cache curl openssl
|
||||
- export PAYLOAD='{}'
|
||||
- export SIGNATURE="sha256=$(printf %s "$PAYLOAD" | openssl dgst -sha256 -hmac "$DOCKHAND_WEBHOOK_SECRET" -hex | sed 's/^.* //')"
|
||||
- set -e
|
||||
- echo "=== Triggering Dockhand deploy ==="
|
||||
- >-
|
||||
curl --fail --show-error --silent --request POST "$DOCKHAND_WEBHOOK_URL"
|
||||
--header 'Content-Type: application/json' --header "X-Hub-Signature-256: $SIGNATURE"
|
||||
--data "$PAYLOAD"
|
||||
# image: curlimages/curl:latest
|
||||
# environment:
|
||||
# WEBHOOK_URL:
|
||||
# from_secret: dockhand_webhook_url
|
||||
# commands:
|
||||
# - set -e
|
||||
# - echo "=== Triggering Portainer stack redeploy ==="
|
||||
# - |
|
||||
# resp=$(curl -s -w "\n%{http_code}" -X POST "$WEBHOOK_URL")
|
||||
# body=$(echo "$resp" | head -n -1)
|
||||
# code=$(echo "$resp" | tail -n 1)
|
||||
# if [ "$code" != "200" ] && [ "$code" != "204" ]; then
|
||||
# echo "Webhook failed (HTTP $code): $body"
|
||||
# exit 1
|
||||
# fi
|
||||
# echo "✓ Portainer redeploy triggered (HTTP $code)"
|
||||
depends_on:
|
||||
- Docker image build (qr-api + qr-web)
|
||||
|
||||
|
||||
@@ -9,7 +9,11 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
volumes:
|
||||
- /mnt/config/docker/kutt/postgres:/var/lib/postgresql/data
|
||||
- type: bind
|
||||
source: /mnt/docker-host/volumes/kutt/postgres
|
||||
target: /var/lib/postgresql/data
|
||||
bind:
|
||||
create_host_path: false
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER:-kutt}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD}
|
||||
@@ -31,7 +35,11 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
volumes:
|
||||
- /mnt/config/docker/kutt/redis:/data
|
||||
- type: bind
|
||||
source: /mnt/docker-host/volumes/kutt/redis
|
||||
target: /data
|
||||
bind:
|
||||
create_host_path: false
|
||||
command: redis-server --appendonly yes
|
||||
healthcheck:
|
||||
test: ['CMD', 'redis-cli', 'ping']
|
||||
@@ -119,8 +127,16 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
volumes:
|
||||
- /mnt/config/docker/qr/db:/data
|
||||
- /mnt/config/docker/qr/uploads:/uploads
|
||||
- type: bind
|
||||
source: /mnt/docker-host/volumes/qr/db
|
||||
target: /data
|
||||
bind:
|
||||
create_host_path: false
|
||||
- type: bind
|
||||
source: /mnt/docker-host/volumes/qr/uploads
|
||||
target: /uploads
|
||||
bind:
|
||||
create_host_path: false
|
||||
environment:
|
||||
PORT: ${API_PORT:-8080}
|
||||
DB_PATH: ${DB_PATH:-/data/db.sqlite}
|
||||
|
||||
Reference in new issue
Block a user