script to update mounted dev sources

This commit is contained in:
Leon 2017-02-15 07:23:58 +13:00
parent cf2dc3b34d
commit a7e184e69b
2 changed files with 13 additions and 2 deletions

View file

@ -3,12 +3,11 @@ FROM wordpress:latest
RUN apt-get update \
& docker-php-ext-install zip
# install wp cli
RUN curl -L https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o /usr/local/bin/wp
RUN chmod +x /usr/local/bin/wp
COPY post_launch.sh /post_launch.sh
COPY sync_sources.sh /sync_sources.sh

12
sync_sources.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
# run wp-cli cmds from wp install path
cd /var/www/html
# copy plugin source files to WP path (else changing ownership will change on host)
cp -r /app wp-content/plugins/wordpress-static-html-output
# www-data to own plugin src files
chown -R www-data:www-data wp-content/plugins/wordpress-static-html-output
chown -R www-data:www-data wp-content/uploads