mirror of
https://github.com/CoolnsX/selfhost_podman.git
synced 2025-12-20 11:55:16 +05:30
Compare commits
5 Commits
412d29f6ee
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
608913ebaa | ||
|
|
2fd3636714 | ||
|
|
1902ee824e | ||
|
|
1775b24793 | ||
|
|
9c484f553f |
@@ -3,7 +3,7 @@ Description=Gitea Container
|
|||||||
|
|
||||||
[Container]
|
[Container]
|
||||||
ContainerName=gitea
|
ContainerName=gitea
|
||||||
Image=docker.io/gitea/gitea:latest
|
Image=ghcr.io/go-gitea/gitea:latest
|
||||||
|
|
||||||
# Enable auto-update container
|
# Enable auto-update container
|
||||||
AutoUpdate=registry
|
AutoUpdate=registry
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Description=Headscale Container
|
|||||||
[Container]
|
[Container]
|
||||||
Network=host
|
Network=host
|
||||||
ContainerName=headscale
|
ContainerName=headscale
|
||||||
Image=docker.io/headscale/headscale:latest
|
Image=ghcr.io/juanfont/headscale:latest
|
||||||
Exec=serve
|
Exec=serve
|
||||||
|
|
||||||
# Enable auto-update container
|
# Enable auto-update container
|
||||||
|
|||||||
@@ -6,7 +6,3 @@ PodName=immich
|
|||||||
#PublishPort=2283:2283
|
#PublishPort=2283:2283
|
||||||
Network=host
|
Network=host
|
||||||
Volume=%h/podman/immich/.socket:/tmp/immich
|
Volume=%h/podman/immich/.socket:/tmp/immich
|
||||||
|
|
||||||
# to satisfy immich bitch permissions problems
|
|
||||||
UIDMap=1000:0:1
|
|
||||||
UIDMap=0:1:1000
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ After=synapse_db.service
|
|||||||
[Container]
|
[Container]
|
||||||
Pod=matrix.pod
|
Pod=matrix.pod
|
||||||
ContainerName=synapse
|
ContainerName=synapse
|
||||||
Image=docker.io/matrixdotorg/synapse:latest
|
Image=ghcr.io/element-hq/synapse:latest
|
||||||
|
|
||||||
# Enable auto-update container
|
# Enable auto-update container
|
||||||
AutoUpdate=registry
|
AutoUpdate=registry
|
||||||
|
|||||||
@@ -11,9 +11,15 @@ set -eu
|
|||||||
# so that your nextcloud can run or update properly. #
|
# so that your nextcloud can run or update properly. #
|
||||||
#################################################################
|
#################################################################
|
||||||
|
|
||||||
|
# fix nextcloud not setting Local Time zone
|
||||||
|
apk add --no-cache tzdata
|
||||||
|
|
||||||
# default to UID=1000 if not set
|
# default to UID=1000 if not set
|
||||||
TARGET_UID="${PUID:-1000}"
|
TARGET_UID="${PUID:-1000}"
|
||||||
|
|
||||||
|
# add user as the su in image doesn't know user ID we will pass
|
||||||
|
adduser -D -u "${TARGET_UID}" "abc" || true
|
||||||
|
|
||||||
# Overwrite /usr/local/etc/php-fpm.d/zz-docker.conf to make php-fpm listen on unix socket
|
# Overwrite /usr/local/etc/php-fpm.d/zz-docker.conf to make php-fpm listen on unix socket
|
||||||
cat <<EOF >/usr/local/etc/php-fpm.d/zz-docker.conf
|
cat <<EOF >/usr/local/etc/php-fpm.d/zz-docker.conf
|
||||||
; Generated by /nextcloud-entrypoint.sh
|
; Generated by /nextcloud-entrypoint.sh
|
||||||
@@ -42,7 +48,7 @@ pm.max_requests = 1000
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# replace "www-data" with numeric $PUID in /entrypoint.sh
|
# replace "www-data" with numeric $PUID in /entrypoint.sh
|
||||||
sed -i "s/www-data/${TARGET_UID}/g" /entrypoint.sh
|
sed -i "s/www-data/abc/g" /entrypoint.sh
|
||||||
|
|
||||||
# execute the patched entrypoint with all args
|
# execute the patched entrypoint with all args
|
||||||
exec /entrypoint.sh php-fpm
|
exec /entrypoint.sh php-fpm
|
||||||
|
|||||||
@@ -9,16 +9,18 @@ export DATABASE_PREFIX="oc_"
|
|||||||
# Clean shutdown handler
|
# Clean shutdown handler
|
||||||
cleanup() {
|
cleanup() {
|
||||||
echo "[*] Stopping notify_push..."
|
echo "[*] Stopping notify_push..."
|
||||||
kill -TERM "$NOTIFY_PID" 2>/dev/null && echo "[*] notify push stopped.." || echo "Unable to Kill Notify Push.."
|
kill -TERM "$NOTIFY_PID" 2>/dev/null && echo "[✓] notify push stopped.." || echo "Unable to Kill Notify Push.."
|
||||||
echo "[*] Bye"
|
echo "[✓] Bye..."
|
||||||
}
|
}
|
||||||
trap 'cleanup' TERM INT
|
trap 'cleanup' TERM INT
|
||||||
|
|
||||||
|
echo "[*] Checking Nextcloud Host Presence..."
|
||||||
while ! curl -s --fail --max-time 15 "$NEXTCLOUD_URL/status.php" >/dev/null; do
|
while ! curl -s --fail --max-time 15 "$NEXTCLOUD_URL/status.php" >/dev/null; do
|
||||||
echo "[*] Waiting for Nextcloud to start..."
|
echo "[*] Waiting for Nextcloud to start..."
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "[✓] Nextcloud Host is UP and Serving."
|
||||||
echo "[*] Ensuring notify_push app is installed and enabled..."
|
echo "[*] Ensuring notify_push app is installed and enabled..."
|
||||||
php occ app:install notify_push || true
|
php occ app:install notify_push || true
|
||||||
php occ app:enable notify_push || true
|
php occ app:enable notify_push || true
|
||||||
@@ -27,13 +29,21 @@ echo "[*] Starting notify_push binary..."
|
|||||||
/var/www/html/custom_apps/notify_push/bin/x86_64/notify_push &
|
/var/www/html/custom_apps/notify_push/bin/x86_64/notify_push &
|
||||||
NOTIFY_PID=$!
|
NOTIFY_PID=$!
|
||||||
|
|
||||||
|
# Posix compliance check to ensure notify_push is running
|
||||||
|
if kill -0 "$PID" 2>/dev/null; then
|
||||||
|
echo "[✓] Notify Push is UP and running."
|
||||||
|
else
|
||||||
|
echo "[X] Notify Push is not Running!! Exiting.."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Wait for the socket to active and respond, max 30 seconds
|
# Wait for the socket to active and respond, max 30 seconds
|
||||||
i=1
|
i=1
|
||||||
while [ $i -le 6 ]; do
|
while [ $i -le 6 ]; do
|
||||||
if [ -S "$SOCKET_PATH" ]; then
|
if [ -S "$SOCKET_PATH" ]; then
|
||||||
echo "[*] Socket file exists, testing HTTP response..."
|
echo "[*] Socket file exists, testing HTTP response..."
|
||||||
if curl -s --max-time 5 --unix-socket "$SOCKET_PATH" http://localhost/ -o /dev/null; then
|
if curl -s --max-time 5 --unix-socket "$SOCKET_PATH" http://localhost/ -o /dev/null; then
|
||||||
echo "[*] notify_push is ready, running occ notify_push:setup"
|
echo "[*] Running occ notify_push:setup"
|
||||||
php occ notify_push:setup "${NEXTCLOUD_URL}/push" || true
|
php occ notify_push:setup "${NEXTCLOUD_URL}/push" || true
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user