filesite
2 years ago
3 changed files with 112 additions and 0 deletions
@ -0,0 +1,25 @@ |
|||||||
|
FROM centos:centos7.9.2009 |
||||||
|
|
||||||
|
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ |
||||||
|
&& yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm \ |
||||||
|
&& yum -y install yum-utils \ |
||||||
|
&& yum-config-manager --disable 'remi-php*' \ |
||||||
|
&& yum-config-manager --enable remi-safe \ |
||||||
|
&& yum -y install php82-php-fpm php82-php-gd php82-php-mbstring nginx \ |
||||||
|
&& ln -s /opt/remi/php82/root/usr/sbin/php-fpm /usr/sbin/php-fpm \ |
||||||
|
&& cd /etc/opt/remi/php82/ \ |
||||||
|
&& sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini \ |
||||||
|
&& mkdir -p /var/www/downloads && cd /var/www/downloads/ && \ |
||||||
|
wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz" && \ |
||||||
|
tar -zxvf master.tar.gz && \ |
||||||
|
mv machete/ /var/www/ && \ |
||||||
|
cd /var/www/ && rm -rf downloads/ && \ |
||||||
|
mkdir machete/www/navs/ && mkdir machete/www/girls/ && mkdir machete/www/videos/ && \ |
||||||
|
rm -f /etc/nginx/nginx.conf && \ |
||||||
|
cp /var/www/machete/conf/nginx.conf /etc/nginx/nginx.conf \ |
||||||
|
cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/conf.d/machete.conf |
||||||
|
|
||||||
|
EXPOSE 80/tcp |
||||||
|
ENTRYPOINT ["/var/www/machete/docker-entrypoint.sh"] |
||||||
|
# 默认使用导航站皮肤:manual |
||||||
|
CMD ["manual"] |
@ -0,0 +1,54 @@ |
|||||||
|
#!/bin/sh |
||||||
|
echo "Install php82-fpm and nginx in centos 7.9" |
||||||
|
|
||||||
|
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
||||||
|
yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm |
||||||
|
yum -y install yum-utils |
||||||
|
yum-config-manager --disable 'remi-php*' |
||||||
|
yum-config-manager --enable remi-safe |
||||||
|
yum -y install php82-php-fpm php82-php-gd php82-php-mbstring |
||||||
|
yum -y install nginx |
||||||
|
|
||||||
|
ln -s /opt/remi/php82/root/usr/sbin/php-fpm /usr/sbin/php-fpm |
||||||
|
php-fpm -v |
||||||
|
|
||||||
|
## show php82-fpm's path |
||||||
|
echo "php82-php-fpm installed in" |
||||||
|
rpm -ql php82-php-fpm-8.2.0~rc5-18.el7.remi |
||||||
|
|
||||||
|
## replace configs in php.ini |
||||||
|
cd /etc/opt/remi/php82/ |
||||||
|
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini |
||||||
|
|
||||||
|
## start php-fpm in background |
||||||
|
#php-fpm -D |
||||||
|
|
||||||
|
## start php-fpm in foreground |
||||||
|
#php-fpm -F |
||||||
|
|
||||||
|
## start nginx |
||||||
|
#/usr/sbin/nginx |
||||||
|
|
||||||
|
|
||||||
|
## php82-fpm's path |
||||||
|
##/etc/logrotate.d/php82-php-fpm |
||||||
|
##/etc/opt/remi/php82/php-fpm.conf |
||||||
|
##/etc/opt/remi/php82/php-fpm.d |
||||||
|
##/etc/opt/remi/php82/php-fpm.d/www.conf |
||||||
|
##/etc/opt/remi/php82/sysconfig/php-fpm |
||||||
|
##/etc/systemd/system/php82-php-fpm.service.d |
||||||
|
##/opt/remi/php82/root/usr/sbin/php-fpm |
||||||
|
##/opt/remi/php82/root/usr/share/doc/php82-php-fpm-8.2.0~rc5 |
||||||
|
##/opt/remi/php82/root/usr/share/doc/php82-php-fpm-8.2.0~rc5/php-fpm.conf.default |
||||||
|
##/opt/remi/php82/root/usr/share/doc/php82-php-fpm-8.2.0~rc5/www.conf.default |
||||||
|
##/opt/remi/php82/root/usr/share/fpm |
||||||
|
##/opt/remi/php82/root/usr/share/fpm/status.html |
||||||
|
##/opt/remi/php82/root/usr/share/licenses/php82-php-fpm-8.2.0~rc5 |
||||||
|
##/opt/remi/php82/root/usr/share/licenses/php82-php-fpm-8.2.0~rc5/fpm_LICENSE |
||||||
|
##/opt/remi/php82/root/usr/share/man/man8/php-fpm.8.gz |
||||||
|
##/usr/lib/systemd/system/php82-php-fpm.service |
||||||
|
##/var/opt/remi/php82/lib/php/opcache |
||||||
|
##/var/opt/remi/php82/lib/php/session |
||||||
|
##/var/opt/remi/php82/lib/php/wsdlcache |
||||||
|
##/var/opt/remi/php82/log/php-fpm |
||||||
|
##/var/opt/remi/php82/run/php-fpm |
@ -0,0 +1,33 @@ |
|||||||
|
user nginx; |
||||||
|
worker_processes auto; |
||||||
|
error_log /var/log/nginx/error.log; |
||||||
|
pid /run/nginx.pid; |
||||||
|
|
||||||
|
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. |
||||||
|
include /usr/share/nginx/modules/*.conf; |
||||||
|
|
||||||
|
events { |
||||||
|
worker_connections 1024; |
||||||
|
} |
||||||
|
|
||||||
|
http { |
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
||||||
|
'$status $body_bytes_sent "$http_referer" ' |
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"'; |
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log main; |
||||||
|
|
||||||
|
sendfile on; |
||||||
|
tcp_nopush on; |
||||||
|
tcp_nodelay on; |
||||||
|
keepalive_timeout 65; |
||||||
|
types_hash_max_size 4096; |
||||||
|
|
||||||
|
include /etc/nginx/mime.types; |
||||||
|
default_type application/octet-stream; |
||||||
|
|
||||||
|
# Load modular configuration files from the /etc/nginx/conf.d directory. |
||||||
|
# See http://nginx.org/en/docs/ngx_core_module.html#include |
||||||
|
# for more information. |
||||||
|
include /etc/nginx/conf.d/*.conf; |
||||||
|
} |
Loading…
Reference in new issue