Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #62 from niiknow/master
Browse files Browse the repository at this point in the history
For 1.4.2
  • Loading branch information
noogen authored Oct 27, 2018
2 parents 722c7eb + e9c0536 commit 8168a84
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 33 deletions.
39 changes: 17 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM niiknow/docker-hostingbase:1.1.1

FROM niiknow/docker-hostingbase:1.2.3
LABEL maintainer="noogen <[email protected]>"

ENV DEBIAN_FRONTEND=noninteractive \
VESTA=/usr/local/vesta \
GOLANG_VERSION=1.11.1 \
Expand All @@ -12,8 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
NGINX_PSOL_VERSION=1.13.35.2 \
IMAGE_FILTER_URL=https://raw.githubusercontent.com/niiknow/docker-nginx-image-proxy/master/build/src/ngx_http_image_filter_module.c

RUN \
cd /tmp \
RUN cd /tmp \
&& echo "nginx mysql bind clamav ssl-cert dovecot dovenull Debian-exim postgres debian-spamd epmd couchdb memcache mongodb redis" | xargs -n1 groupadd -K GID_MIN=100 -K GID_MAX=999 ${g} \
&& echo "nginx nginx mysql mysql bind bind clamav clamav dovecot dovecot dovenull dovenull Debian-exim Debian-exim postgres postgres debian-spamd debian-spamd epmd epmd couchdb couchdb memcache memcache mongodb mongodb redis redis" | xargs -n2 useradd -d /nonexistent -s /bin/false -K UID_MIN=100 -K UID_MAX=999 -g ${g} \
&& usermod -d /var/lib/mysql mysql \
Expand Down Expand Up @@ -44,6 +41,7 @@ RUN \
&& echo "deb http://nginx.org/packages/ubuntu/ xenial nginx" | tee -a /etc/apt/sources.list \
&& echo "deb-src http://nginx.org/packages/ubuntu/ xenial nginx" | tee -a /etc/apt/sources.list \
&& apt-get update && apt-get -y --no-install-recommends upgrade \
&& curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - \
&& apt-get install -y --no-install-recommends libpcre3-dev libssl-dev dpkg-dev libgd-dev iproute uuid-dev \
&& mkdir -p ${NGINX_BUILD_DIR} \
&& cd ${NGINX_BUILD_DIR} \
Expand All @@ -61,24 +59,23 @@ RUN \
&& cd ${NGINX_BUILD_DIR}/nginx-${NGINX_VERSION}; dpkg-buildpackage -uc -us -b \
&& cd ${NGINX_BUILD_DIR} \
&& dpkg -i nginx_${NGINX_VERSION}-1~xenial_amd64.deb \
&& apt-get install -yq php7.1-mbstring php7.1-cgi php7.1-cli php7.1-dev php7.1-geoip php7.1-common php7.1-xmlrpc php7.1-sybase \
php7.1-curl php7.1-enchant php7.1-imap php7.1-xsl php7.1-mysql php7.1-mysqlnd php7.1-pspell php7.1-gd php7.1-zip \
&& apt-get install -yq php7.1-mbstring php7.1-cgi php7.1-cli php7.1-dev php7.1-geoip php7.1-common php7.1-xmlrpc php7.1-sybase php7.1-curl \
php7.1-enchant php7.1-imap php7.1-xsl php7.1-mysql php7.1-mysqli php7.1-mysqlnd php7.1-pspell php7.1-gd php7.1-zip \
php7.1-tidy php7.1-opcache php7.1-json php7.1-bz2 php7.1-pgsql php7.1-mcrypt php7.1-readline php7.1-imagick \
php7.1-intl php7.1-sqlite3 php7.1-ldap php7.1-xml php7.1-redis php7.1-dev php7.1-fpm php7.1-sodium php7.1-soap \
php7.1-bcmath \
&& apt-get install -yq php7.2-mbstring php7.2-cgi php7.2-cli php7.2-dev php7.2-geoip php7.2-common php7.2-xmlrpc php7.2-sybase \
php7.2-curl php7.2-enchant php7.2-imap php7.2-xsl php7.2-mysql php7.2-mysqlnd php7.2-pspell php7.2-gd php7.2-zip \
php7.1-intl php7.1-sqlite3 php7.1-ldap php7.1-xml php7.1-redis php7.1-dev php7.1-fpm php7.1-sodium \
php7.1-soap php7.1-bcmath php7.1-fileinfo php7.1-xdebug php7.1-exif php7.1-tokenizer \
&& apt-get install -yq php7.2-mbstring php7.2-cgi php7.2-cli php7.2-dev php7.2-geoip php7.2-common php7.2-xmlrpc php7.2-sybase php7.2-curl \
php7.2-enchant php7.2-imap php7.2-xsl php7.2-mysql php7.2-mysqli php7.2-mysqlnd php7.2-pspell php7.2-gd php7.2-zip \
php7.2-tidy php7.2-opcache php7.2-json php7.2-bz2 php7.2-pgsql php7.2-readline php7.2-imagick \
php7.2-intl php7.2-sqlite3 php7.2-ldap php7.2-xml php7.2-redis php7.2-dev php7.2-fpm php7.2-soap \
php7.2-bcmath \
php7.2-intl php7.2-sqlite3 php7.2-ldap php7.2-xml php7.2-redis php7.2-dev php7.2-fpm \
php7.2-soap php7.2-bcmath php7.2-fileinfo php7.2-xdebug php7.2-exif php7.2-tokenizer \
&& rm -f /etc/apt/sources.list && mv /etc/apt/sources.list.bak /etc/apt/sources.list \
&& rm -rf /usr/src/nginx \
&& rm -rf /tmp/* \
&& apt-get -yf autoremove \
&& apt-get clean

RUN \
cd /tmp \
RUN cd /tmp \

# begin setup for vesta
&& curl -SL https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/vst-install-ubuntu.sh -o /tmp/vst-install-ubuntu.sh \
Expand Down Expand Up @@ -115,7 +112,8 @@ RUN \

# install nodejs, memcached, redis-server, openvpn, mongodb, dotnet-sdk, and couchdb
&& apt-get install -yf --no-install-recommends nodejs memcached php-memcached redis-server \
openvpn mongodb-org php-mongodb couchdb dotnet-sdk-2.1 \
openvpn mongodb-org php-mongodb couchdb dotnet-sdk-2.1 poppler-utils ghostscript \
libgs-dev imagemagick \

# make sure we default fcgi and php to 7.2
&& mv /usr/bin/php-cgi /usr/bin/php-cgi-old \
Expand All @@ -128,8 +126,7 @@ RUN \
&& pecl config-set php_bin /usr/bin/php7.2 \
&& pecl config-set php_suffix 7.2 \

# setting upawscli, golang
# awscli
# setting upawscli, golang, and awscli
&& curl -O https://bootstrap.pypa.io/get-pip.py \
&& python get-pip.py \
&& pip install awscli \
Expand All @@ -149,8 +146,7 @@ RUN \

COPY rootfs/. /

RUN \
cd /tmp \
RUN cd /tmp \

# tweaks
&& chmod +x /etc/init.d/dovecot \
Expand Down Expand Up @@ -302,7 +298,7 @@ RUN \
# increase open file limit for nginx and apache
&& echo "\n\n* soft nofile 800000\n* hard nofile 800000\n\n" >> /etc/security/limits.conf \

# patch psql9.5 backup
# patch psql9.5+ backup
&& sed -i -e "s/\-c \-\-inserts \-O \-x \-i \-f/\-\-inserts \-x \-f/g" /usr/local/vesta/func/db.sh \
&& sed -i -e "s/\-c \-\-inserts \-O \-x \-f/\-\-inserts \-x \-f/g" /usr/local/vesta/func/db.sh \
&& sed -i -e "s/dbuser/DBUSER/g" /usr/local/vesta/func/rebuild.sh \
Expand All @@ -318,7 +314,6 @@ RUN \

# disable localhost redirect to bad default IP
&& sed -i -e "s/^NAT=.*/NAT=\'\'/g" /usr/local/vesta/data/ips/* \

&& service mysql stop && systemctl disable mysql \
&& service postgresql stop && systemctl disable postgresql \
&& service redis-server stop && systemctl disable redis-server \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Enjoy!!!

* This release also default php to 7.2 and switch to golang 1.11.1

* I've made some attempts in 1.4.x to provide auto-upgrade with rsync but there were hickups along the way that I find may not work perfectly for everyone. Therefore, as this is a Major upgrade (consider it like a fresh install), I would suggest to perform user backup, download of backup, and restore. It's the same step as you would expect to migrate another server: https://vestacp.com/docs/#how-to-migrate-user-to-another-server

1.3.10 - finalizing stuff to get ready for 1.4.0

1.3.9 - update to 0.9.8-23, see security bulleton/notice in forum here: https://forum.vestacp.com/viewtopic.php?f=10&t=17795 The panel should have auto-updated, we're just updating the build for new user convenience.
Expand Down
10 changes: 0 additions & 10 deletions rootfs/etc/my_init.d/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ if [ -f /etc/fail2ban/jail.new ]; then
mv /etc/fail2ban/jail.new /etc/fail2ban/jail.local
fi

# auto-upgrade
if [ -f /etc/apache2/mods-enabled/php7.0.conf ] || [ -f /etc/apache2/mods-enabled/php7.1.conf ]; then
echo "[i] running auto-upgrade"
bash /bin/vesta-update.sh

a2dismod php7.0 || true
a2dismod php7.1 || true
a2enmod php7.2 || true
fi

# make sure runit services are running across restart
find /etc/service/ -name "down" -exec rm -rf {} \;

Expand Down
3 changes: 2 additions & 1 deletion rootfs/sysprepz/admin/bin/vesta-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ rsync --update -ahp --progress --exclude 'data' --exclude 'log' --exclude 'conf'

rsync --update -ahp --progress /vesta-start/local/vesta/data/templates/ /usr/local/vesta/data/templates/

rsync --update -ahp --progress --exclude 'conf.d' /vesta-start/etc/ /etc/
# comment out -- too much overriding to run
# rsync --update -ahp --progress --exclude 'conf.d' --exclude 'mysql' vesta-start/etc/ /etc/

# update php conf
rm -rf /vesta/etc/php/*
Expand Down

0 comments on commit 8168a84

Please sign in to comment.