0e549cad46
Original PHP source rsync'd from production server (slot-ss.com) on 2026-04-27. Excluded from import: - data/editor (74GB user uploads), data/file (8.5GB attachments) - data/member_image, vendor/, db100up/, caches/sessions/logs/tmp Includes: - 11,636 files, ~206MB source code (gnuboard5 v5.6.6, Eyoom builder, YoungCart 4) - 28 plugins (bacara, chatbot, cron, swiunApi, sns, sms5, ...) - Active theme: eb4_maga_005 (Eyoom magazine layout) - Local Docker dev stack (PHP 7.4 + Apache + Redis + MariaDB) under docker/ - PostgreSQL migration setup (pgloader configs) under db/ - Architecture/migration docs under docs/ Single non-source patch: src/config.php now reads G5_DOMAIN_OVERRIDE env var so the local Docker stack can serve at http://localhost:8088 without touching the production constant. Falls back to https://slot-ss.com when unset.
50 lines
2.0 KiB
Bash
Executable File
50 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Install required PHP extensions for gnuboard5
|
|
if [ ! -f /tmp/.deps_installed ]; then
|
|
echo "[entrypoint] Installing system deps + PHP extensions..."
|
|
apt-get update -qq
|
|
apt-get install -y -qq --no-install-recommends \
|
|
libonig-dev libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \
|
|
libxml2-dev libcurl4-openssl-dev libicu-dev unzip git \
|
|
libxslt1-dev libssl-dev > /dev/null
|
|
|
|
docker-php-ext-configure gd --with-jpeg --with-freetype > /dev/null
|
|
docker-php-ext-install -j$(nproc) \
|
|
mysqli pdo pdo_mysql gd mbstring zip xml curl intl xsl bcmath > /dev/null
|
|
|
|
# Install Redis PHP extension (used by lib/RedisCache.class.php)
|
|
pecl install -f redis 2>&1 | tail -3 || true
|
|
docker-php-ext-enable redis 2>&1 | tail -3 || true
|
|
|
|
a2enmod rewrite headers > /dev/null
|
|
|
|
# composer for vendor/ install (gnuboard requires monolog, google/apiclient, firebase/jwt)
|
|
if [ ! -f /usr/local/bin/composer ]; then
|
|
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer > /dev/null
|
|
fi
|
|
|
|
touch /tmp/.deps_installed
|
|
echo "[entrypoint] Deps installed."
|
|
fi
|
|
|
|
# Ensure data/ directories that are normally writable exist & are writable
|
|
cd /var/www/html
|
|
for d in data data/cache data/session data/tmp data/log data/file data/editor data/member_image data/common; do
|
|
[ -d "$d" ] || mkdir -p "$d"
|
|
done
|
|
chown -R www-data:www-data data tmp 2>/dev/null || true
|
|
chmod -R 0777 data 2>/dev/null || true
|
|
|
|
# Install composer dependencies if vendor/ is missing (it was excluded from rsync)
|
|
if [ ! -d /var/www/html/vendor ]; then
|
|
echo "[entrypoint] Running composer install..."
|
|
cd /var/www/html
|
|
composer install --no-dev --no-interaction --no-progress 2>&1 | tail -20 || \
|
|
echo "[entrypoint] composer install failed; site may still partially load"
|
|
fi
|
|
|
|
echo "[entrypoint] Starting Apache. Visit http://localhost:8080/"
|
|
exec docker-php-entrypoint apache2-foreground
|