Reviewed-on: https://storage.hided.net/gitea/devsam/docker/pulls/1
Co-authored-by: hide_d <hided62@gmail.com>
Co-committed-by: hide_d <hided62@gmail.com>
This commit was merged in pull request #1.
This commit is contained in:
2021-08-19 14:46:33 +09:00
parent a2b3a14384
commit 995c5fa94b
5 changed files with 14 additions and 4 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
FROM php:7.4-fpm-buster
FROM php:8.0-fpm-buster
#debian
ENV LC_ALL=C.UTF-8
@@ -30,7 +30,6 @@ RUN mkdir -p /var/www/html/; \
COPY entrypoint.sh /usr/local/bin/
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
ARG UID=33
@@ -44,6 +43,7 @@ RUN if [ "$UID" != 33 ]; then \
fi; \
echo $UID > /var/tmp.txt ; \
chmod +x /usr/local/bin/entrypoint.sh; \
mkdir -p /var/www/opcache; \
chown -R www-data:www-data /var/www; \
chmod -R g=u /var/www; \
mkdir -p /var/www/.ssh; \
@@ -51,5 +51,7 @@ RUN if [ "$UID" != 33 ]; then \
chmod 700 /var/www/.ssh; \
chmod 600 /var/www/.ssh/*;
COPY sam_conf.ini /usr/local/etc/php/conf.d/sam_conf.ini
ENTRYPOINT ["entrypoint.sh"]
CMD ["php-fpm"]
+1 -1
View File
@@ -14,7 +14,7 @@ if [ ! -f "$samRoot/index.php" ]; then
gosu www-data git clone $gameGitPath $samRoot
fi
if [ $HIDCHE_IMAGE_USE_INTERNAL = "yes" ] && [ ! -d "$imageRoot" ]; then
if [ "$HIDCHE_IMAGE_USE_INTERNAL" = "yes" ] && [ ! -d "$imageRoot" ]; then
if [[ "$imgGitPath" =~ ^ssh ]]; then
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;
+2
View File
@@ -7,9 +7,11 @@ memory_limit=512M
apc.enable_cli=1
opcache.enable=1
opcache.jit_buffer_size=100M
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.validate_timestamps=on
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
opcache.file_cache="/var/www/opcache"
+2 -1
View File
@@ -41,7 +41,6 @@ RUN { \
mkdir -p /var/www/.ssh;
COPY entrypoint.sh /usr/local/bin/
COPY sam_conf.ini /usr/local/etc/php/conf.d/sam_conf.ini
VOLUME /var/www/board
@@ -60,5 +59,7 @@ RUN if [ "$UID" != 33 ]; then \
mkdir -p /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"]
CMD ["php-fpm"]
+5
View File
@@ -25,6 +25,11 @@ location ~ ^/board/(.+)\.min\.(css|js)$ {
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
location /board/ {
try_files $uri $uri/ /board/index.php$is_args$args;