Skip to content

Commit

Permalink
fix for older nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Feb 20, 2024
1 parent 1990d62 commit a6f248e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ RUN { \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install MySQL client
RUN apt-get update && apt-get install -y default-mysql-client
RUN apt-get update && apt-get install -y default-mysql-client nano

# Install WP-CLI
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
Expand Down Expand Up @@ -187,7 +187,7 @@ RUN \
RUN chmod -R g+rwx /var/www/html/

# Copy the Nginx configuration file into the container at /etc/nginx/nginx.conf
COPY nginx.conf /var/www/nginx.conf
COPY nginx.conf /etc/nginx/nginx.conf
# Add wordpress config and database env
COPY --chown=www-data:www-data wp-config.php /usr/src/wordpress/wp-config.php
# ENV WORDPRESS_DB_USER=root
Expand Down
10 changes: 10 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ else
echo "File $file_path does not exist."
fi

#copy nginx config
file_path="/etc/nginx/nginx.conf"
if [ -f "$file_path" ]; then
echo "creating $file_path..."
cp "$file_path" "/var/www/"
echo "Nginx file copied successfully."
else
echo "File $file_path does not exist."
fi

# loop over "pluggable" content in the source, and if it already exists in the destination, skip it
# https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded)
for contentPath in \
Expand Down

0 comments on commit a6f248e

Please sign in to comment.