refactor(umami): migrate PostgreSQL to portable block storage
This commit is contained in:
2 files changed
+38
-18
No files matched your search
+29
-11
@@ -15,22 +15,40 @@ depends_on:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger Dockhand Deploy
|
- name: Trigger Dockhand Deploy
|
||||||
image: curlimages/curl:latest
|
image: alpine:3.22
|
||||||
environment:
|
environment:
|
||||||
WEBHOOK_URL:
|
DOCKHAND_WEBHOOK_URL:
|
||||||
from_secret: dockhand_webhook_url
|
from_secret: dockhand_webhook_url
|
||||||
|
DOCKHAND_WEBHOOK_SECRET:
|
||||||
|
from_secret: dockhand_webhook_secret
|
||||||
commands:
|
commands:
|
||||||
|
- 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
|
- set -e
|
||||||
- echo "=== Triggering Dockhand deploy ==="
|
- echo "=== Triggering Dockhand deploy ==="
|
||||||
- |
|
- >-
|
||||||
resp=$(curl -s -w "\n%{http_code}" -X POST "$WEBHOOK_URL")
|
curl --fail --show-error --silent --request POST "$DOCKHAND_WEBHOOK_URL"
|
||||||
body=$(echo "$resp" | head -n -1)
|
--header 'Content-Type: application/json' --header "X-Hub-Signature-256: $SIGNATURE"
|
||||||
code=$(echo "$resp" | tail -n 1)
|
--data "$PAYLOAD"
|
||||||
if [ "$code" != "200" ] && [ "$code" != "204" ]; then
|
# image: curlimages/curl:latest
|
||||||
echo "Webhook failed (HTTP $code): $body"
|
# environment:
|
||||||
exit 1
|
# WEBHOOK_SECRET:
|
||||||
fi
|
# from_secret: dockhand_webhook_secret
|
||||||
echo "✓ Dockhand deploy triggered (HTTP $code)"
|
# WEBHOOK_URL:
|
||||||
|
# from_secret: dockhand_webhook_url
|
||||||
|
# commands:
|
||||||
|
# - set -e
|
||||||
|
# - echo "=== Triggering Dockhand deploy ==="
|
||||||
|
# - |
|
||||||
|
# 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 "✓ Dockhand deploy triggered (HTTP $code)"
|
||||||
|
|
||||||
- name: Send Deploy Status Notification (success)
|
- name: Send Deploy Status Notification (success)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
|
|||||||
+9
-7
@@ -1,6 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
umami:
|
umami:
|
||||||
image: ghcr.io/umami-software/umami:postgresql-latest
|
# image: ghcr.io/umami-software/umami:postgresql-latest
|
||||||
|
image: ghcr.io/umami-software/umami:postgresql-latest@sha256:b64f40400d77bcadd39cf5c62a1e368c99524ca442024f96e1133355a19a5dbc
|
||||||
container_name: umami
|
container_name: umami
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -28,7 +29,8 @@ services:
|
|||||||
- traefik.http.services.umami.loadbalancer.server.port=3000
|
- traefik.http.services.umami.loadbalancer.server.port=3000
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:16-alpine
|
# image: postgres:16-alpine
|
||||||
|
image: postgres:16-alpine@sha256:f2f98726820d0342055351c6e9d36e705f5bfffb3dd53ff556325114b08afb6d
|
||||||
container_name: umami-db
|
container_name: umami-db
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -36,7 +38,11 @@ services:
|
|||||||
POSTGRES_USER: ${POSTGRES_USER}
|
POSTGRES_USER: ${POSTGRES_USER}
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- umami-db-data:/var/lib/postgresql/data
|
- type: bind
|
||||||
|
source: /mnt/config/docker/umami/postgres
|
||||||
|
target: /var/lib/postgresql/data
|
||||||
|
bind:
|
||||||
|
create_host_path: false
|
||||||
networks:
|
networks:
|
||||||
- umami-backend
|
- umami-backend
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -50,7 +56,3 @@ networks:
|
|||||||
external: true
|
external: true
|
||||||
umami-backend:
|
umami-backend:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
|
||||||
umami-db-data:
|
|
||||||
external: true
|
|
||||||
Reference in new issue
Block a user