Skip to content
Snippets Groups Projects
Commit 70e1a474 authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Adds auto install command

parent 9cf539ec
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,10 @@ FROM pierreozoux/apache ...@@ -3,7 +3,10 @@ FROM pierreozoux/apache
# Download latest version of Wordpress into /app # Download latest version of Wordpress into /app
RUN curl -L https://wordpress.org/wordpress-4.1.tar.gz | tar xz && \ RUN curl -L https://wordpress.org/wordpress-4.1.tar.gz | tar xz && \
mv wordpress/* app && \ mv wordpress/* app && \
mv /app/wp-content /wp-content mv /app/wp-content /wp-content && \
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
chmod +x wp-cli.phar && \
mv wp-cli.phar /usr/local/bin/wp
ADD wp-config.php /app/wp-config.php ADD wp-config.php /app/wp-config.php
# Add script to create 'wordpress' DB # Add script to create 'wordpress' DB
......
...@@ -50,6 +50,16 @@ if [[ $DB_CONNECTABLE -eq 0 ]]; then ...@@ -50,6 +50,16 @@ if [[ $DB_CONNECTABLE -eq 0 ]]; then
fi fi
fi fi
echo "=> Done!" echo "=> Done!"
echo "=> Installation of Wordpress"
PASS=`openssl rand -base64 15`
cd /app
wp --allow-root core install --url=${URL} --title=${URL} --admin_user=${EMAIL} --admin_password=${PASS} --admin_email=${EMAIL}
wp --allow-root plugin install wordpress-https
wp --allow-root plugin activate wordpress-https
echo "=> Done!"
echo "============================================="
echo "to connect ${EMAIL}:${PASS}"
echo "============================================="
else else
echo "=> Skipped creation of database $DB_NAME – it already exists." echo "=> Skipped creation of database $DB_NAME – it already exists."
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment