2023-12-24 20:15:46 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# DEPLOYTIME=$(date +%s%3N)
|
2023-12-24 20:57:34 +01:00
|
|
|
# Check if .env file exists
|
|
|
|
if [ ! -f .env ]; then
|
|
|
|
echo "Error: .env file not found in /var/www/owncloud"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2023-12-24 20:23:56 +01:00
|
|
|
export $(cat .env | xargs)
|
|
|
|
envsubst < docker-stack.yml | docker stack deploy selfhosted-owncloud --compose-file=docker-stack.yml --with-registry-auth --resolve-image always
|
2023-12-24 20:15:46 +01:00
|
|
|
# curl -X POST https://log.spares.nu/api/annotations \
|
|
|
|
# -H "Authorization: Bearer eyJrIjoiOGNhQVM5SkNaaEFlQ1FkTDFJNTdPNzhFazVuTko0TTEiLCJuIjoiZGVwbG95IiwiaWQiOjF9" \
|
|
|
|
# -H "Content-Type: application/json" \
|
|
|
|
# -d "{\"time\":${DEPLOYTIME},\"timeEnd\":${DEPLOYTIME},\"tags\":[\"deploy\"],\"text\":\"Docker Stack Deploy\"}"; echo
|