Browse Source

add upgrade script

master
filesite 2 years ago
parent
commit
6cecab40f1
  1. 16
      Dockerfile
  2. 21
      Dockerfile_samba
  3. 1
      bin/install.sh
  4. 19
      bin/upgrade.sh

16
Dockerfile

@ -4,14 +4,14 @@ RUN apk add \ @@ -4,14 +4,14 @@ RUN apk add \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/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/http.d/default.conf && \
cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/http.d/machete.conf
&& 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/http.d/default.conf \
&& cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/http.d/machete.conf
EXPOSE 80/tcp
ENTRYPOINT ["/var/www/machete/docker-entrypoint.sh"]

21
Dockerfile_samba

@ -5,19 +5,20 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n @@ -5,19 +5,20 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
&& 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 \
&& yum -y install php82-php-fpm php82-php-gd php82-php-mbstring nginx wget rsync \
&& 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
&& 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 \
&& ln -s /var/www/machete/bin/upgrade.sh /usr/bin/upgrade_machete
EXPOSE 80/tcp
ENTRYPOINT ["/var/www/machete/docker-entrypoint.sh"]

1
bin/install.sh

@ -8,6 +8,7 @@ yum-config-manager --disable 'remi-php*' @@ -8,6 +8,7 @@ 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
yum -y install wget
ln -s /opt/remi/php82/root/usr/sbin/php-fpm /usr/sbin/php-fpm
php-fpm -v

19
bin/upgrade.sh

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#!/bin/sh
echo "Upgrade machete ..."
echo ""
mkdir -p /var/www/downloads
cd /var/www/downloads/
rm -f master.tar.gz
rm -rf machete/
wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz"
tar -zxvf master.tar.gz
rsync -vruL machete/* /var/www/machete/ \
--exclude=www/content/ \
--exclude=www/navs/ \
--exclude=www/girls/ \
--exclude=www/videos/ \
--exclude=runtime/
echo "Machete upgrade done."
echo ""
Loading…
Cancel
Save