Initial import of slot-ss.com (gnuboard5 + Eyoom + YoungCart) for migration
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.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
<Directory /var/www/html/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// Local override for /var/www/html/data/dbconfig.php
|
||||
// Mounted read-only by docker-compose. Original (production) dbconfig stays
|
||||
// in /Users/chpark/slot/src/data/dbconfig.php; this file is only used inside
|
||||
// the Docker stack.
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
define('G5_MYSQL_HOST', getenv('DB_HOST') ?: 'mariadb');
|
||||
define('G5_MYSQL_USER', getenv('DB_USER') ?: 'root');
|
||||
define('G5_MYSQL_PASSWORD', getenv('DB_PASS') ?: 'rootpass');
|
||||
define('G5_MYSQL_DB', getenv('DB_NAME') ?: 'inspection2');
|
||||
define('G5_MYSQL_SET_MODE', true);
|
||||
|
||||
define('G5_TABLE_PREFIX', 'g5_');
|
||||
define('G5_TOKEN_ENCRYPTION_KEY', 'ac57f676fe741f0ab3471d81dbee3bf1');
|
||||
|
||||
$g5['write_prefix'] = G5_TABLE_PREFIX.'write_';
|
||||
$g5['auth_table'] = G5_TABLE_PREFIX.'auth';
|
||||
$g5['config_table'] = G5_TABLE_PREFIX.'config';
|
||||
$g5['group_table'] = G5_TABLE_PREFIX.'group';
|
||||
$g5['group_member_table'] = G5_TABLE_PREFIX.'group_member';
|
||||
$g5['board_table'] = G5_TABLE_PREFIX.'board';
|
||||
$g5['board_file_table'] = G5_TABLE_PREFIX.'board_file';
|
||||
$g5['board_good_table'] = G5_TABLE_PREFIX.'board_good';
|
||||
$g5['board_new_table'] = G5_TABLE_PREFIX.'board_new';
|
||||
$g5['login_table'] = G5_TABLE_PREFIX.'login';
|
||||
$g5['mail_table'] = G5_TABLE_PREFIX.'mail';
|
||||
$g5['member_table'] = G5_TABLE_PREFIX.'member';
|
||||
$g5['memo_table'] = G5_TABLE_PREFIX.'memo';
|
||||
$g5['poll_table'] = G5_TABLE_PREFIX.'poll';
|
||||
$g5['poll_etc_table'] = G5_TABLE_PREFIX.'poll_etc';
|
||||
$g5['point_table'] = G5_TABLE_PREFIX.'point';
|
||||
$g5['popular_table'] = G5_TABLE_PREFIX.'popular';
|
||||
$g5['scrap_table'] = G5_TABLE_PREFIX.'scrap';
|
||||
$g5['visit_table'] = G5_TABLE_PREFIX.'visit';
|
||||
$g5['visit_sum_table'] = G5_TABLE_PREFIX.'visit_sum';
|
||||
$g5['uniqid_table'] = G5_TABLE_PREFIX.'uniqid';
|
||||
$g5['autosave_table'] = G5_TABLE_PREFIX.'autosave';
|
||||
$g5['cert_history_table'] = G5_TABLE_PREFIX.'cert_history';
|
||||
$g5['cert_config_table'] = @include_once($G5_CERT_CONFIG);
|
||||
$g5['qa_config_table'] = G5_TABLE_PREFIX.'qa_config';
|
||||
$g5['qa_content_table'] = G5_TABLE_PREFIX.'qa_content';
|
||||
$g5['content_table'] = G5_TABLE_PREFIX.'content';
|
||||
$g5['faq_table'] = G5_TABLE_PREFIX.'faq';
|
||||
$g5['faq_master_table'] = G5_TABLE_PREFIX.'faq_master';
|
||||
$g5['new_win_table'] = G5_TABLE_PREFIX.'new_win';
|
||||
$g5['menu_table'] = G5_TABLE_PREFIX.'menu';
|
||||
$g5['social_profile_table'] = G5_TABLE_PREFIX.'member_social_profiles';
|
||||
$g5['member_cert_history_table'] = G5_TABLE_PREFIX.'member_cert_history';
|
||||
|
||||
define('G5_USE_SHOP', true);
|
||||
define('G5_SHOP_TABLE_PREFIX', 'g5_shop_');
|
||||
|
||||
$g5['g5_shop_default_table'] = G5_SHOP_TABLE_PREFIX.'default';
|
||||
$g5['g5_shop_banner_table'] = G5_SHOP_TABLE_PREFIX.'banner';
|
||||
$g5['g5_shop_cart_table'] = G5_SHOP_TABLE_PREFIX.'cart';
|
||||
$g5['g5_shop_category_table'] = G5_SHOP_TABLE_PREFIX.'category';
|
||||
$g5['g5_shop_event_table'] = G5_SHOP_TABLE_PREFIX.'event';
|
||||
$g5['g5_shop_event_item_table'] = G5_SHOP_TABLE_PREFIX.'event_item';
|
||||
$g5['g5_shop_item_table'] = G5_SHOP_TABLE_PREFIX.'item';
|
||||
$g5['g5_shop_item_option_table'] = G5_SHOP_TABLE_PREFIX.'item_option';
|
||||
$g5['g5_shop_item_use_table'] = G5_SHOP_TABLE_PREFIX.'item_use';
|
||||
$g5['g5_shop_item_qa_table'] = G5_SHOP_TABLE_PREFIX.'item_qa';
|
||||
$g5['g5_shop_item_relation_table'] = G5_SHOP_TABLE_PREFIX.'item_relation';
|
||||
$g5['g5_shop_order_table'] = G5_SHOP_TABLE_PREFIX.'order';
|
||||
$g5['g5_shop_order_delete_table'] = G5_SHOP_TABLE_PREFIX.'order_delete';
|
||||
$g5['g5_shop_wish_table'] = G5_SHOP_TABLE_PREFIX.'wish';
|
||||
$g5['g5_shop_coupon_table'] = G5_SHOP_TABLE_PREFIX.'coupon';
|
||||
$g5['g5_shop_coupon_zone_table'] = G5_SHOP_TABLE_PREFIX.'coupon_zone';
|
||||
$g5['g5_shop_coupon_log_table'] = G5_SHOP_TABLE_PREFIX.'coupon_log';
|
||||
$g5['g5_shop_sendcost_table'] = G5_SHOP_TABLE_PREFIX.'sendcost';
|
||||
$g5['g5_shop_personalpay_table'] = G5_SHOP_TABLE_PREFIX.'personalpay';
|
||||
$g5['g5_shop_order_address_table'] = G5_SHOP_TABLE_PREFIX.'order_address';
|
||||
$g5['g5_shop_item_stocksms_table'] = G5_SHOP_TABLE_PREFIX.'item_stocksms';
|
||||
$g5['g5_shop_post_log_table'] = G5_SHOP_TABLE_PREFIX.'order_post_log';
|
||||
$g5['g5_shop_order_data_table'] = G5_SHOP_TABLE_PREFIX.'order_data';
|
||||
$g5['g5_shop_inicis_log_table'] = G5_SHOP_TABLE_PREFIX.'inicis_log';
|
||||
@@ -0,0 +1,41 @@
|
||||
version: '3.8'
|
||||
|
||||
# Local replica of slot-ss.com for analysis & login verification.
|
||||
# Uses the standalone `slot-mariadb` container (started by the migration script)
|
||||
# at host port 33306. Visit http://localhost:8088 after `docker-compose up`.
|
||||
|
||||
services:
|
||||
php:
|
||||
image: php:7.4-apache
|
||||
container_name: slot-php
|
||||
ports:
|
||||
- "8088:80"
|
||||
volumes:
|
||||
- ../src:/var/www/html
|
||||
- ./dbconfig.local.php:/var/www/html/data/dbconfig.php:ro
|
||||
- ./php.ini:/usr/local/etc/php/conf.d/zz-custom.ini:ro
|
||||
- ./apache-vhost.conf:/etc/apache2/sites-available/000-default.conf:ro
|
||||
- ./entrypoint.sh:/usr/local/bin/slot-entrypoint.sh:ro
|
||||
entrypoint: ["/bin/bash", "/usr/local/bin/slot-entrypoint.sh"]
|
||||
environment:
|
||||
DB_HOST: slot-mariadb
|
||||
DB_USER: root
|
||||
DB_PASS: rootpass
|
||||
DB_NAME: inspection2
|
||||
G5_DOMAIN_OVERRIDE: "http://localhost:8088"
|
||||
networks:
|
||||
- slot-net
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: slot-redis
|
||||
networks:
|
||||
- slot-net
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
slot-net:
|
||||
external: true
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/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
|
||||
@@ -0,0 +1,16 @@
|
||||
; PHP overrides for slot-ss.com local replica
|
||||
date.timezone = "Asia/Seoul"
|
||||
default_charset = "UTF-8"
|
||||
short_open_tag = On
|
||||
upload_max_filesize = 100M
|
||||
post_max_size = 100M
|
||||
memory_limit = 512M
|
||||
max_execution_time = 120
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
error_reporting = E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR
|
||||
log_errors = On
|
||||
error_log = /var/log/apache2/php_errors.log
|
||||
session.cookie_httponly = 1
|
||||
mbstring.internal_encoding = UTF-8
|
||||
mbstring.http_output = UTF-8
|
||||
Reference in New Issue
Block a user