diff --git a/Dockerfile b/Dockerfile index 7eed95c..a4bf19f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,16 @@ -FROM dreamfactorysoftware/df-base-img:ubuntu-20 +ARG BASE=dreamfactorysoftware/df-base-img:ubuntu-22 +FROM $BASE # Configure Nginx COPY dreamfactory.conf /etc/nginx/sites-available/dreamfactory.conf # Get DreamFactory -RUN git clone https://github.com/dreamfactorysoftware/dreamfactory.git /opt/dreamfactory +ARG BRANCH=master +RUN git clone --branch $BRANCH https://github.com/dreamfactorysoftware/dreamfactory.git /opt/dreamfactory WORKDIR /opt/dreamfactory -# Uncomment lines 12 & 21 if you would like to upgrade your environment while replacing the License Key value with your issued Key and adding the license files to the df-docker directory. +# Uncomment lines 14 & 23 if you would like to upgrade your environment while replacing the License Key value with your issued Key and adding the license files to the df-docker directory. # COPY composer.* /opt/dreamfactory/ # Install packages diff --git a/README.md b/README.md index bd27b08..1d05e47 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
- Docker container for DreamFactory 4.x using Ubuntu 20.04, PHP 7.4 and NGINX. + Docker container for DreamFactory 5.x using Ubuntu 22.04, PHP 8.1 and NGINX.
@@ -77,7 +77,7 @@ Go to `127.0.0.1` in your browser. It will take some time upon building, but you ### 1) Add the license files to the `df-docker` directory -### 2) Uncomment lines 12 and 21 of `Dockerfile` +### 2) Uncomment lines 14 and 23 of `Dockerfile` ### 3) Add the License Key to line 21 of `Dockerfile` diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 1704148..47ac23a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -15,11 +15,11 @@ done # Configure NGINX and www.conf ln -s /etc/nginx/sites-available/dreamfactory.conf /etc/nginx/sites-enabled/dreamfactory.conf && \ -sed -i "s/pm.max_children = 5/pm.max_children = 5000/" /etc/php/7.4/fpm/pool.d/www.conf && \ -sed -i "s/pm.start_servers = 2/pm.start_servers = 150/" /etc/php/7.4/fpm/pool.d/www.conf && \ -sed -i "s/pm.min_spare_servers = 1/pm.min_spare_servers = 100/" /etc/php/7.4/fpm/pool.d/www.conf && \ -sed -i "s/pm.max_spare_servers = 3/pm.max_spare_servers = 200/" /etc/php/7.4/fpm/pool.d/www.conf && \ -sed -i "s/pm = dynamic/pm = ondemand/" /etc/php/7.4/fpm/pool.d/www.conf && \ +sed -i "s/pm.max_children = 5/pm.max_children = 5000/" /etc/php/8.1/fpm/pool.d/www.conf && \ +sed -i "s/pm.start_servers = 2/pm.start_servers = 150/" /etc/php/8.1/fpm/pool.d/www.conf && \ +sed -i "s/pm.min_spare_servers = 1/pm.min_spare_servers = 100/" /etc/php/8.1/fpm/pool.d/www.conf && \ +sed -i "s/pm.max_spare_servers = 3/pm.max_spare_servers = 200/" /etc/php/8.1/fpm/pool.d/www.conf && \ +sed -i "s/pm = dynamic/pm = ondemand/" /etc/php/8.1/fpm/pool.d/www.conf && \ sed -i "s/worker_connections 768;/worker_connections 2048;/" /etc/nginx/nginx.conf && \ sed -i "s/keepalive_timeout 65;/keepalive_timeout 10;/" /etc/nginx/nginx.conf @@ -194,8 +194,8 @@ if [ -n "$SENDMAIL_DEFAULT_COMMAND" ]; then sed -i "s/#SENDMAIL_DEFAULT_COMMAND=.*/SENDMAIL_DEFAULT_COMMAND=\"$(echo "$SENDMAIL_DEFAULT_COMMAND" | sed 's/\//\\\//g')\"/" .env fi -# start php7.4-fpm -service php7.4-fpm start +# start php8.1-fpm +service php8.1-fpm start # start cron service for df-scheduler service cron start diff --git a/dreamfactory.conf b/dreamfactory.conf index f8e0ef2..7cace96 100644 --- a/dreamfactory.conf +++ b/dreamfactory.conf @@ -1,5 +1,5 @@ upstream php_handler { - server unix:/var/run/php/php7.4-fpm.sock; + server unix:/var/run/php/php8.1-fpm.sock; #server 127.0.0.1:9000 backup; }