update compose.yaml and entrypoint.sh to adjust volume mappings and simplify entrypoint logic
This commit is contained in:
+2
-9
@@ -6,18 +6,16 @@ services:
|
||||
SCALABLE_CLI_VERSION: "1.0.0"
|
||||
PUID: ${PUID}
|
||||
PGID: ${PGID}
|
||||
command: ["--daemon"]
|
||||
image: scalable-sync:latest
|
||||
hostname: scalable-sync
|
||||
container_name: scalable-sync
|
||||
restart: unless-stopped
|
||||
# networks:
|
||||
# - ext_net
|
||||
volumes:
|
||||
- scalable-sync-data:/app/data
|
||||
- scalable-sync-config:/tmp/sc-config
|
||||
- ${HOME}/.config/scalable-cli:/tmp/sc-config:ro
|
||||
env_file:
|
||||
- .env
|
||||
command: ["--daemon"]
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request,json,os; req=urllib.request.Request(os.environ['WF_MCP_URL'],method='POST',data=json.dumps({'jsonrpc':'2.0','id':1,'method':'ping'}).encode(),headers={'Authorization':'Bearer '+os.environ['WF_MCP_TOKEN'],'Content-Type':'application/json'}); urllib.request.urlopen(req,timeout=5)"]
|
||||
interval: 5m
|
||||
@@ -25,10 +23,5 @@ services:
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
#networks:
|
||||
# ext_net:
|
||||
# external: true
|
||||
|
||||
volumes:
|
||||
scalable-sync-data:
|
||||
scalable-sync-config:
|
||||
+1
-19
@@ -1,25 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
chown -R ${PUID:-1000}:${PGID:-1000} /app/data /tmp/sc-config 2>/dev/null || true
|
||||
chmod 700 /tmp/sc-config 2>/dev/null || true
|
||||
|
||||
mkdir -p "${SC_CONFIG_DIR:-/tmp/sc-config}"
|
||||
cat > "${SC_CONFIG_DIR:-/tmp/sc-config}/config.toml" <<'EOF'
|
||||
[auth]
|
||||
session_backend = "file"
|
||||
signing_key_backend = "file"
|
||||
EOF
|
||||
|
||||
# DBus starten
|
||||
dbus-daemon --session --fork --address="unix:path=/tmp/dbus-session" 2>/dev/null || true
|
||||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-session
|
||||
|
||||
# gnome-keyring als Secret Service starten (als appuser)
|
||||
gosu appuser sh -c '
|
||||
echo -n "" | gnome-keyring-daemon --unlock --components=secrets 2>/dev/null
|
||||
gnome-keyring-daemon --start --components=secrets 2>/dev/null || true
|
||||
'
|
||||
chown -R ${PUID:-1000}:${PGID:-1000} /app/data 2>/dev/null || true
|
||||
|
||||
if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py" ]; then
|
||||
shift
|
||||
|
||||
Reference in New Issue
Block a user