Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</h1>

<p align="center">
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.
</p>

<p align="center">
Expand Down Expand Up @@ -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`

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.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

Expand Down Expand Up @@ -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
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.4-fpm.sock;
server unix:/var/run/php/php8.1-fpm.sock;
#server 127.0.0.1:9000 backup;
}

Expand Down