php8 #1
@@ -1,4 +1,4 @@
|
|||||||
FROM php:7.4-fpm-buster
|
FROM php:8.0-fpm-buster
|
||||||
#debian
|
#debian
|
||||||
|
|
||||||
ENV LC_ALL=C.UTF-8
|
ENV LC_ALL=C.UTF-8
|
||||||
@@ -30,7 +30,6 @@ RUN mkdir -p /var/www/html/; \
|
|||||||
|
|
||||||
COPY entrypoint.sh /usr/local/bin/
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
COPY id_ecdsa known_hosts /var/www/.ssh/
|
COPY id_ecdsa known_hosts /var/www/.ssh/
|
||||||
COPY sam_conf.ini /usr/local/etc/php/conf.d/sam_conf.ini
|
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
|
|
||||||
ARG UID=33
|
ARG UID=33
|
||||||
@@ -44,6 +43,7 @@ RUN if [ "$UID" != 33 ]; then \
|
|||||||
fi; \
|
fi; \
|
||||||
echo $UID > /var/tmp.txt ; \
|
echo $UID > /var/tmp.txt ; \
|
||||||
chmod +x /usr/local/bin/entrypoint.sh; \
|
chmod +x /usr/local/bin/entrypoint.sh; \
|
||||||
|
mkdir -p /var/www/opcache; \
|
||||||
chown -R www-data:www-data /var/www; \
|
chown -R www-data:www-data /var/www; \
|
||||||
chmod -R g=u /var/www; \
|
chmod -R g=u /var/www; \
|
||||||
mkdir -p /var/www/.ssh; \
|
mkdir -p /var/www/.ssh; \
|
||||||
@@ -51,5 +51,7 @@ RUN if [ "$UID" != 33 ]; then \
|
|||||||
chmod 700 /var/www/.ssh; \
|
chmod 700 /var/www/.ssh; \
|
||||||
chmod 600 /var/www/.ssh/*;
|
chmod 600 /var/www/.ssh/*;
|
||||||
|
|
||||||
|
COPY sam_conf.ini /usr/local/etc/php/conf.d/sam_conf.ini
|
||||||
|
|
||||||
ENTRYPOINT ["entrypoint.sh"]
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
CMD ["php-fpm"]
|
CMD ["php-fpm"]
|
||||||
@@ -14,7 +14,7 @@ if [ ! -f "$samRoot/index.php" ]; then
|
|||||||
gosu www-data git clone $gameGitPath $samRoot
|
gosu www-data git clone $gameGitPath $samRoot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $HIDCHE_IMAGE_USE_INTERNAL = "yes" ] && [ ! -d "$imageRoot" ]; then
|
if [ "$HIDCHE_IMAGE_USE_INTERNAL" = "yes" ] && [ ! -d "$imageRoot" ]; then
|
||||||
if [[ "$imgGitPath" =~ ^ssh ]]; then
|
if [[ "$imgGitPath" =~ ^ssh ]]; then
|
||||||
query=`echo "<?php \\\$a=parse_url('$imgGitPath');echo join(' ', [\\\$a['port']?'-p '.\\\$a['port']:'',\\\$a['host']]);" | php`
|
query=`echo "<?php \\\$a=parse_url('$imgGitPath');echo join(' ', [\\\$a['port']?'-p '.\\\$a['port']:'',\\\$a['host']]);" | php`
|
||||||
gosu www-data ssh-keyscan $query >> /var/www/.ssh/known_hosts 2>/dev/null;
|
gosu www-data ssh-keyscan $query >> /var/www/.ssh/known_hosts 2>/dev/null;
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ memory_limit=512M
|
|||||||
apc.enable_cli=1
|
apc.enable_cli=1
|
||||||
|
|
||||||
opcache.enable=1
|
opcache.enable=1
|
||||||
|
opcache.jit_buffer_size=100M
|
||||||
opcache.interned_strings_buffer=8
|
opcache.interned_strings_buffer=8
|
||||||
opcache.max_accelerated_files=10000
|
opcache.max_accelerated_files=10000
|
||||||
opcache.validate_timestamps=on
|
opcache.validate_timestamps=on
|
||||||
opcache.memory_consumption=128
|
opcache.memory_consumption=128
|
||||||
opcache.save_comments=1
|
opcache.save_comments=1
|
||||||
opcache.revalidate_freq=1
|
opcache.revalidate_freq=1
|
||||||
|
opcache.file_cache="/var/www/opcache"
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ RUN { \
|
|||||||
mkdir -p /var/www/.ssh;
|
mkdir -p /var/www/.ssh;
|
||||||
|
|
||||||
COPY entrypoint.sh /usr/local/bin/
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
COPY sam_conf.ini /usr/local/etc/php/conf.d/sam_conf.ini
|
|
||||||
|
|
||||||
VOLUME /var/www/board
|
VOLUME /var/www/board
|
||||||
|
|
||||||
@@ -60,5 +59,7 @@ RUN if [ "$UID" != 33 ]; then \
|
|||||||
mkdir -p /var/www/.ssh; \
|
mkdir -p /var/www/.ssh; \
|
||||||
chown www-data:www-data /var/www/.ssh;
|
chown www-data:www-data /var/www/.ssh;
|
||||||
|
|
||||||
|
COPY sam_conf.ini /usr/local/etc/php/conf.d/sam_conf.ini
|
||||||
|
|
||||||
ENTRYPOINT ["entrypoint.sh"]
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
CMD ["php-fpm"]
|
CMD ["php-fpm"]
|
||||||
@@ -25,6 +25,11 @@ location ~ ^/board/(.+)\.min\.(css|js)$ {
|
|||||||
try_files $uri $uri/ /board/$1.$2;
|
try_files $uri $uri/ /board/$1.$2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# fix download URL when other directives for static files are present
|
||||||
|
location ~ ^/board/files/download/ {
|
||||||
|
try_files $uri $uri/ /board/index.php$is_args$args;
|
||||||
|
}
|
||||||
|
|
||||||
# all other short URLs
|
# all other short URLs
|
||||||
location /board/ {
|
location /board/ {
|
||||||
try_files $uri $uri/ /board/index.php$is_args$args;
|
try_files $uri $uri/ /board/index.php$is_args$args;
|
||||||
|
|||||||
Reference in New Issue
Block a user