1
0
forked from metin2/web

Added website Docker image, bumped PHP version, added mall authentication, added experimental patcher support, improved migrations, added teasers

This commit is contained in:
2024-09-22 21:14:31 +03:00
parent a1d0a5b9cf
commit dea61c5a0c
253 changed files with 23071 additions and 547 deletions

50
docker/init.sh Normal file
View File

@ -0,0 +1,50 @@
#!/bin/bash
set -e
KERNEL_VERSION=$(uname -r)
KERNEL_ARCH=$(uname -m)
APACHE_VERSION=$(apache2 -v | head -n 1 | cut -d " " -f 3 | cut -d "/" -f 2)
PHP_VERSION=$(php -r "echo PHP_VERSION;")
echo "The Old Metin2 Project - Web management system"
echo "Kernel ${KERNEL_VERSION}, architecture: ${KERNEL_ARCH}, Apache: ${APACHE_VERSION}, PHP: ${PHP_VERSION}"
# Create storage directories if they don't exist
if [ ! -d /app/storage/app/public/ ]; then
mkdir -p /app/storage/app/public/;
fi
if [ ! -d /app/storage/app/public/patch-data/ ]; then
mkdir -p /app/storage/app/public/patch-data/;
fi
if [ ! -d /app/storage/framework/cache/data/ ]; then
mkdir -p /app/storage/framework/cache/data/;
fi
if [ ! -d /app/storage/framework/sessions/ ]; then
mkdir -p /app/storage/framework/sessions/;
fi
if [ ! -d /app/storage/framework/testing/ ]; then
mkdir -p /app/storage/framework/sessions/;
fi
if [ ! -d /app/storage/framework/views/ ]; then
mkdir -p /app/storage/framework/views/;
fi
if [ ! -d /app/storage/logs/ ]; then
mkdir -p /app/storage/logs/;
fi
# Set folder permissions
chown -R www-data:www-data /app/storage
# Link filesystem paths
/usr/local/bin/php artisan storage:link
# Run database migrations
/usr/local/bin/php artisan migrate --force --no-interaction
# Run Apache webserver
apache2-foreground