diff --git a/docker/Dockerfile b/docker/Dockerfile index 89c9ac70..b5f3a99d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,28 +15,21 @@ RUN apt-get update && apt-get install -y \ libxml2-dev \ libzip-dev \ zip \ - unzip + unzip \ + nano \ + vim # Clear cache RUN apt-get clean && rm -rf /var/lib/apt/lists/* # Install PHP extensions RUN docker-php-ext-install pdo pdo_mysql gd zip opcache - RUN docker-php-ext-configure opcache --enable-opcache - -#INSTALL APCU RUN pecl install apcu-${APCU_VERSION} && docker-php-ext-enable apcu -RUN echo "extension=apcu.so" >> /usr/local/etc/php/php.ini -RUN echo "apc.enable_cli=1" >> /usr/local/etc/php/php.ini -RUN echo "apc.enable=1" >> /usr/local/etc/php/php.ini -#APCU # Get latest Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer -COPY docker/opcache.ini /usr/local/etc/php/conf.d/opcache.ini - # Create system user to run Composer Commands #RUN useradd -G www-data,root -u $uid -d /home/$user $user RUN mkdir -p /home/$user/.composer && \ @@ -49,7 +42,8 @@ USER $user WORKDIR /home/$user RUN git clone https://github.com/otland/forgottenserver.git -COPY docker/config.lua /home/$user/forgottenserver +COPY --chown=www-data:www-data docker/config.lua /home/$user/forgottenserver +COPY --chown=www-data:www-data docker/config.local.php /var/www/html #WORKDIR /home/$user/forgottenserver diff --git a/docker/opcache.ini b/docker/opcache.ini deleted file mode 100644 index 93149678..00000000 --- a/docker/opcache.ini +++ /dev/null @@ -1,2 +0,0 @@ -[opcache] -opcache.enable=1 diff --git a/install/index.php b/install/index.php index 9c2e5048..6100b853 100644 --- a/install/index.php +++ b/install/index.php @@ -195,7 +195,7 @@ if(is_writable(CACHE) && (MYAAC_OS != 'WINDOWS' || win_is_writable(CACHE))) { } } - if(!$allow) + if(!$allow && !config('install_ignore_ip_check')) { $content = warning('In file install/ip.txt must be your IP!
In file is:
' . nl2br($file_content) . '
diff --git a/install/steps/4-config.php b/install/steps/4-config.php index 325b97f1..731538c3 100644 --- a/install/steps/4-config.php +++ b/install/steps/4-config.php @@ -11,6 +11,7 @@ foreach($config['clients'] as $client) { } $twig->display('install.config.html.twig', array( + 'config' => $config, 'clients' => $clients, 'timezones' => DateTimeZone::listIdentifiers(), 'locale' => $locale, diff --git a/install/steps/5-database.php b/install/steps/5-database.php index b75608fc..41517c31 100644 --- a/install/steps/5-database.php +++ b/install/steps/5-database.php @@ -37,6 +37,9 @@ if(!$error) { $configToSave['gzip_output'] = false; $configToSave['cache_engine'] = 'auto'; $configToSave['cache_prefix'] = 'myaac_' . generateRandomString(8, true, false, true); + if (isset($config['install_ignore_ip_check'])) { + $configToSave['install_ignore_ip_check'] = $config['install_ignore_ip_check']; + } require BASE . 'install/includes/config.php'; @@ -84,7 +87,7 @@ if(!$error) { $_SESSION['config_content'] = $content; unset($_SESSION['saved']); - $locale['step_database_error_file'] = str_replace('$FILE$', '' . BASE . 'config.php', $locale['step_database_error_file']); + $locale['step_database_error_file'] = str_replace('$FILE$', '' . BASE . 'config.local.php', $locale['step_database_error_file']); error($locale['step_database_error_file'] . '
'); } diff --git a/system/templates/install.config.html.twig b/system/templates/install.config.html.twig index ab4fc361..afb91a70 100644 --- a/system/templates/install.config.html.twig +++ b/system/templates/install.config.html.twig @@ -10,9 +10,13 @@ {% for value in ['server_path'] %} + {% if value == 'server_path' and config.server_path is not null %} + {% set server_path = { 'var_server_path': config.server_path } %} + {% set session = session | merge (server_path) %} + {% endif %}
- + {{ locale['step_config_' ~ value ~ '_desc'] }}
{% endfor %}