Initial Commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
FROM php:7.3-fpm-buster
|
||||
#debian
|
||||
|
||||
RUN apt -y update ;\
|
||||
apt -y install \
|
||||
bzip2 git rsync \
|
||||
libmemcached-dev libcurl4-openssl-dev libmcrypt-dev \
|
||||
libicu-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev \
|
||||
libzip-dev libxml2-dev libsqlite3-dev gosu
|
||||
|
||||
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
|
||||
docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd; \
|
||||
docker-php-ext-configure mysqli --with-mysqli=mysqlnd; \
|
||||
docker-php-ext-install -j "$(nproc)" \
|
||||
exif \
|
||||
gd \
|
||||
intl \
|
||||
opcache \
|
||||
pcntl \
|
||||
pdo_mysql \
|
||||
mysqli \
|
||||
zip \
|
||||
;
|
||||
RUN pecl install memcached mrypt
|
||||
#from nextcloud setting
|
||||
RUN { \
|
||||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.interned_strings_buffer=8'; \
|
||||
echo 'opcache.max_accelerated_files=10000'; \
|
||||
echo 'opcache.memory_consumption=128'; \
|
||||
echo 'opcache.save_comments=1'; \
|
||||
echo 'opcache.revalidate_freq=1'; \
|
||||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
\
|
||||
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
|
||||
\
|
||||
mkdir /var/www/data; \
|
||||
chown -R www-data:root /var/www; \
|
||||
chmod -R g=u /var/www
|
||||
|
||||
VOLUME /var/www/html
|
||||
|
||||
ENV TZ=Asia/Seoul
|
||||
|
||||
COPY entrypoint_hidche_app.sh /usr/local/bin/
|
||||
ENTRYPOINT ["entrypoint_hidche_app.sh"]
|
||||
CMD ["php-fpm"]
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
wwwRoot="/var/www/html"
|
||||
samRoot="$wwwRoot/sam"
|
||||
imageRoot="$wwwRoot/image"
|
||||
|
||||
gameGitPath="https://storage.hided.net/gogs/devsam/core.git"
|
||||
imgGitPath="https://storage.hided.net/gogs/devsam/image.git"
|
||||
|
||||
|
||||
if [ ! -f "$wwwRoot/index.php" ]; then
|
||||
echo "<?php header('location:sam',TRUE,301);" > $wwwRoot/index.php
|
||||
chown www-data:www-data $wwwRoot/index.php
|
||||
fi
|
||||
|
||||
if [ ! -f "$samRoot/index.php" ]; then
|
||||
gosu www-data git clone $gameGitPath /var/www/html/sam
|
||||
fi
|
||||
|
||||
if [ $HIDCHE_IMAGE_USE_INTERNAL = "yes" ] && [ ! -d "$imageRoot" ]; then
|
||||
gosu www-data git clone $imgGitPath /var/www/html/image
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user