Skip to content

Commit

Permalink
copy default entrypoint wordpress 6-apache
Browse files Browse the repository at this point in the history
  • Loading branch information
Buburoi committed Mar 14, 2023
1 parent 0037112 commit d2da509
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions wordpress/6-apache/Dockerfile
Expand Up @@ -186,6 +186,7 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
# hadolint ignore=DL3045
# Add default configuration files
COPY --chown=www-data:www-data etc/wp-config.php /var/www/html/
COPY etc/entrypoint.sh /.artifakt/

COPY docker-entrypoint.sh /usr/local/bin/

Expand Down
20 changes: 20 additions & 0 deletions wordpress/6-apache/etc/entrypoint.sh
@@ -0,0 +1,20 @@
#!/bin/bash
set -e

# Generate file holding custom keys
[[ ! -f /data/secret-key.php ]] && \
echo "<?php " > /data/secret-key.php && \
curl https://api.wordpress.org/secret-key/1.1/salt >> /data/secret-key.php && \
chown www-data:www-data /data/secret-key.php

# Uncomment to mount plugins directory if you don't version them
#rm -rf /var/www/html/wp-content/plugins && \
# mkdir -p /data/wp-content/plugins && \
# ln -sfn /data/wp-content/plugins /var/www/html/wp-content/plugins && \
# chown -h www-data:www-data /var/www/html/wp-content/plugins /data/wp-content/plugins

# Uncomment to mount themes directory if you don't version them
#rm -rf /var/www/html/wp-content/themes && \
# mkdir -p /data/wp-content/themes && \
# ln -sfn /data/wp-content/themes /var/www/html/wp-content/themes && \
# chown www-data:www-data /var/www/html/wp-content/themes /data/wp-content/themes

0 comments on commit d2da509

Please sign in to comment.