Skip to content

Commit

Permalink
DP-252 Upgrade df-docker-base image
Browse files Browse the repository at this point in the history
- Upgrade PHP to 7.3
  • Loading branch information
yaroslavmo committed Feb 3, 2021
1 parent a4a2345 commit f599be8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dreamfactorysoftware/df-base-img:develop
FROM dreamfactorysoftware/df-base-img:php7.3

# Configure Nginx
COPY dreamfactory.conf /etc/nginx/sites-available/dreamfactory.conf
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# df-docker

Docker container for DreamFactory 4.x using Ubuntu 16.04, PHP 7.2 and NGINX.
Docker container for DreamFactory 4.x using Ubuntu 16.04, PHP 7.3 and NGINX.

## Prerequisites

Expand Down
14 changes: 7 additions & 7 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.2/fpm/pool.d/www.conf && \
sed -i "s/pm.start_servers = 2/pm.start_servers = 150/" /etc/php/7.2/fpm/pool.d/www.conf && \
sed -i "s/pm.min_spare_servers = 1/pm.min_spare_servers = 100/" /etc/php/7.2/fpm/pool.d/www.conf && \
sed -i "s/pm.max_spare_servers = 3/pm.max_spare_servers = 200/" /etc/php/7.2/fpm/pool.d/www.conf && \
sed -i "s/pm = dynamic/pm = ondemand/" /etc/php/7.2/fpm/pool.d/www.conf && \
sed -i "s/pm.max_children = 5/pm.max_children = 5000/" /etc/php/7.3/fpm/pool.d/www.conf && \
sed -i "s/pm.start_servers = 2/pm.start_servers = 150/" /etc/php/7.3/fpm/pool.d/www.conf && \
sed -i "s/pm.min_spare_servers = 1/pm.min_spare_servers = 100/" /etc/php/7.3/fpm/pool.d/www.conf && \
sed -i "s/pm.max_spare_servers = 3/pm.max_spare_servers = 200/" /etc/php/7.3/fpm/pool.d/www.conf && \
sed -i "s/pm = dynamic/pm = ondemand/" /etc/php/7.3/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

Expand Down Expand Up @@ -187,8 +187,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.2-fpm
service php7.2-fpm start
# start php7.3-fpm
service php7.3-fpm start

# start cron service for df-scheduler
service cron start
Expand Down
2 changes: 1 addition & 1 deletion dreamfactory.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
upstream php_handler {
server unix:/var/run/php/php7.2-fpm.sock;
server unix:/var/run/php/php7.3-fpm.sock;
#server 127.0.0.1:9000 backup;
}

Expand Down

0 comments on commit f599be8

Please sign in to comment.