File size: 1,765 Bytes
39ff20b
 
 
7963e65
39ff20b
 
 
a6da9fd
7963e65
a6da9fd
39ff20b
 
 
 
 
 
a6da9fd
39ff20b
7963e65
 
 
 
 
 
39ff20b
a6da9fd
39ff20b
 
 
 
 
 
 
a6da9fd
39ff20b
7963e65
39ff20b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
set -e

echo "[entrypoint] === FreshRSS starting (v4) ==="
echo "[entrypoint] TZ=$TZ DATA_PATH=$DATA_PATH"

# ── 1. Ensure data directories exist ──────────────────────────────
mkdir -p "$DATA_PATH" "$DATA_PATH/users/admin" "$DATA_PATH/users/_/"
mkdir -p "$DATA_PATH/cache" "$DATA_PATH/favicons" "$DATA_PATH/tokens"
mkdir -p /data/extensions /data/log
mkdir -p /data/PubSubHubbub/feeds /data/PubSubHubbub/keys
mkdir -p /data/Retry-After

# ── 2. Run official entrypoint (install + user create + cron) ────
echo "[entrypoint] running official FreshRSS entrypoint..."
/var/www/FreshRSS/Docker/entrypoint.sh || true
echo "[entrypoint] official entrypoint done"

# ── 3. Override Apache to run as root ─────────────────────────────
# HF storage bucket is FUSE β€” chown/chmod don't work on mounted files.
# Running Apache as root is the only way to get write access.
export APACHE_RUN_USER=root
export APACHE_RUN_GROUP=root
echo "[entrypoint] Apache will run as root (storage bucket workaround)"

# ── 4. Start cron ────────────────────────────────────────────────
if [ -n "$CRON_MIN" ]; then
    if command -v cron >/dev/null 2>&1; then
        cron || true
        echo "[entrypoint] cron started"
    fi
fi

# ── 5. Start Apache ──────────────────────────────────────────────
. /etc/apache2/envvars 2>/dev/null || true
echo "[entrypoint] starting Apache on port $LISTEN (user=$APACHE_RUN_USER)"
exec apache2 -D FOREGROUND