fixing issues

This commit is contained in:
RandyJC
2025-12-01 14:34:24 +01:00
parent 6f03b99d32
commit dd6acfa7b8
3 changed files with 151 additions and 91 deletions

View File

@@ -5,16 +5,25 @@ services:
restart: unless-stopped
environment:
- TZ=${TZ:-UTC}
- INBOX=${INBOX}
- DROP=${DROP}
- INBOX=/inbox
- DROP=/drop
- STABLE_FOR=${STABLE_FOR:-5}
- SCAN_FALLBACK=${SCAN_FALLBACK:-60}
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
volumes:
- ${INBOX}:/inbox:rw
- ${DROP}:/drop:rw
- ./move_stable.sh:/scripts/move_stable.sh:ro
entrypoint: ["/bin/sh","-c","apk add --no-cache inotify-tools coreutils >/dev/null && chmod +x /scripts/move_stable.sh && exec /scripts/move_stable.sh"]
user: "${PUID:-1000}:${PGID:-1000}"
networks:
- npm-network
entrypoint:
- /bin/sh
- -c
- |
set -e
apk add --no-cache inotify-tools coreutils su-exec >/dev/null
exec su-exec "$${PUID}:$${PGID}" /scripts/move_stable.sh
photosync-uploader:
image: alpine:3.19
@@ -29,10 +38,14 @@ services:
- IMMICH_GO_VERSION=${IMMICH_GO_VERSION:-0.31.0}
- SCAN_DIR=/drop
- SCAN_INTERVAL=${UPLOAD_SCAN_INTERVAL:-5}
- IDLE_SLEEP=${UPLOAD_IDLE_SLEEP:-3}
- CONCURRENCY=${UPLOAD_CONCURRENCY:-4}
- IDLE_SLEEP=${UPLOAD_IDLE_SLEEP:-3}
- DELETE_ON_SUCCESS=${DELETE_ON_SUCCESS:-true}
- ALLOW_INSECURE_SSL=${ALLOW_INSECURE_SSL:-false}
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- XDG_CACHE_HOME=/tmp/immich-cache
- HOME=/tmp
volumes:
- ${DROP}:/drop:rw
- ./uploader.sh:/scripts/uploader.sh:ro
@@ -41,17 +54,25 @@ services:
- -c
- |
set -e
apk add --no-cache curl ca-certificates >/dev/null
apk add --no-cache curl ca-certificates su-exec tar >/dev/null
arch="$$(uname -m)"
case "$$arch" in
x86_64) arch="amd64" ;;
x86_64) arch="x86_64" ;;
aarch64) arch="arm64" ;;
arm64) arch="arm64" ;;
*) echo "Unsupported architecture: $$arch"; exit 1 ;;
esac
url="https://github.com/simulot/immich-go/releases/download/v$${IMMICH_GO_VERSION}/immich-go_Linux_$${arch}"
url="https://github.com/simulot/immich-go/releases/download/v$${IMMICH_GO_VERSION}/immich-go_Linux_$${arch}.tar.gz"
echo "[uploader] Downloading immich-go $${IMMICH_GO_VERSION} for $$arch"
curl -fsSL -o /usr/local/bin/immich-go "$$url"
chmod +x /usr/local/bin/immich-go
chmod +x /scripts/uploader.sh
exec /scripts/uploader.sh
user: "${PUID:-1000}:${PGID:-1000}"
tmp="$$(mktemp -d)"
curl -fsSL "$$url" -o "$$tmp/immich-go.tar.gz"
tar -xzf "$$tmp/immich-go.tar.gz" -C "$$tmp"
install -m 0755 "$$tmp/immich-go" /usr/local/bin/immich-go
rm -rf "$$tmp"
exec su-exec "$${PUID}:$${PGID}" /scripts/uploader.sh
networks:
- npm-network
networks:
npm-network:
external: true