Align Docker install and publish workflow
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
|
.next
|
||||||
|
.vercel
|
||||||
|
node_modules
|
||||||
|
coverage
|
||||||
|
site-work
|
||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
@@ -15,7 +15,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: gnosyslabs/synapsis
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ services:
|
|||||||
# Synapsis Application (from GHCR)
|
# Synapsis Application (from GHCR)
|
||||||
# ============================================
|
# ============================================
|
||||||
app:
|
app:
|
||||||
image: ghcr.io/cyph3rasi/synapsis:latest
|
image: ghcr.io/gnosyslabs/synapsis:latest
|
||||||
container_name: synapsis-app
|
container_name: synapsis-app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
+1
-1
@@ -127,7 +127,7 @@ docker compose exec caddy caddy validate --config /etc/caddy/Caddyfile
|
|||||||
### Image pull fails
|
### Image pull fails
|
||||||
```bash
|
```bash
|
||||||
# Verify image exists
|
# Verify image exists
|
||||||
docker pull ghcr.io/cyph3rasi/synapsis:latest
|
docker pull ghcr.io/gnosyslabs/synapsis:latest
|
||||||
|
|
||||||
# Check the published package tags in GitHub Container Registry
|
# Check the published package tags in GitHub Container Registry
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
#
|
#
|
||||||
# All state is stored in Docker volumes - source code is immutable in the image
|
# All state is stored in Docker volumes - source code is immutable in the image
|
||||||
|
|
||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# ============================================
|
# ============================================
|
||||||
# PostgreSQL Database
|
# PostgreSQL Database
|
||||||
|
|||||||
+2
-28
@@ -3,35 +3,10 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
REPO="${REPO:-GnosysLabs/Synapsis}"
|
REPO="${REPO:-GnosysLabs/Synapsis}"
|
||||||
REF="${REF:-}"
|
REF="${REF:-main}"
|
||||||
INSTALL_DIR="${1:-${INSTALL_DIR:-/opt/synapsis}}"
|
INSTALL_DIR="${1:-${INSTALL_DIR:-/opt/synapsis}}"
|
||||||
REPO_API="https://api.github.com/repos/${REPO}"
|
|
||||||
PUBLIC_INSTALL_URL="${PUBLIC_INSTALL_URL:-https://synapsis.social/install.sh}"
|
PUBLIC_INSTALL_URL="${PUBLIC_INSTALL_URL:-https://synapsis.social/install.sh}"
|
||||||
|
|
||||||
resolve_ref() {
|
|
||||||
if [ -n "${REF}" ]; then
|
|
||||||
REF_SOURCE="custom override"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "🔎 Resolving latest Synapsis release"
|
|
||||||
latest_tag=$(
|
|
||||||
curl -fsSL "${REPO_API}/releases/latest" 2>/dev/null \
|
|
||||||
| sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' \
|
|
||||||
| head -n 1
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ -n "${latest_tag}" ]; then
|
|
||||||
REF="${latest_tag}"
|
|
||||||
REF_SOURCE="latest GitHub release"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
REF="main"
|
|
||||||
REF_SOURCE="main fallback"
|
|
||||||
echo "⚠️ Could not resolve the latest release, falling back to ${REF}" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
require_command() {
|
require_command() {
|
||||||
if ! command -v "$1" >/dev/null 2>&1; then
|
if ! command -v "$1" >/dev/null 2>&1; then
|
||||||
echo "❌ Required command not found: $1" >&2
|
echo "❌ Required command not found: $1" >&2
|
||||||
@@ -97,14 +72,13 @@ require_command chmod
|
|||||||
require_command mkdir
|
require_command mkdir
|
||||||
require_command cp
|
require_command cp
|
||||||
|
|
||||||
resolve_ref
|
|
||||||
RAW_BASE="https://raw.githubusercontent.com/${REPO}/${REF}"
|
RAW_BASE="https://raw.githubusercontent.com/${REPO}/${REF}"
|
||||||
|
|
||||||
echo "========================================"
|
echo "========================================"
|
||||||
echo " Synapsis Docker Installer"
|
echo " Synapsis Docker Installer"
|
||||||
echo "========================================"
|
echo "========================================"
|
||||||
echo " Repo: ${REPO}"
|
echo " Repo: ${REPO}"
|
||||||
echo " Ref: ${REF} (${REF_SOURCE})"
|
echo " Ref: ${REF}"
|
||||||
echo " Install dir: ${INSTALL_DIR}"
|
echo " Install dir: ${INSTALL_DIR}"
|
||||||
echo "========================================"
|
echo "========================================"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user