Commit 9780f816 authored by Michiel de Jong's avatar Michiel de Jong

split wordpress-git and known-git off of lamp-git

parent 506a4f09
FROM indiehosters/lamp-git
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get -yq install \
pwgen \
&& rm -rf /var/lib/apt/lists/*
RUN curl -L http://assets.withknown.com/releases/known-0.6.5.tgz
COPY init/known.sh /init/known.sh
COPY init/config.ini /init/config.ini
# wordpress-git
This image adds WordPress to the lamp-git image, using WP-CLI.
````
sudo docker build -t indiehosters/wordpress-git .
sudo docker run -d -v $(pwd)/data:/data indiehosters/wordpress-git
````
database = 'MySQL'
dbhost = 'localhost'
dbname = 'known'
dbuser = 'root'
dbpass = ''
filesystem = 'local'
uploadpath = '/data/uploads/'
#!/bin/bash
$VERSION = 0.6.5
echo "Extracting Known {$VERSION}..."
cd /data/www-content
tar xzf /known-$VERSION.tgz
echo "Setting default config..."
cp /init/config.ini .
echo "Creating empty database..."
echo "CREATE DATABASE IF NOT EXISTS known" | mysql
PWD=`pwgen 40 1`
echo "user: " > /data/login.txt
echo "pass: $PWD" >> /data/login.txt
echo "Please use your browser to set up a user, and edit /data/login.txt manually:"
cat /data/login.txt
FROM indiehosters/lamp-git
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get -yq install \
pwgen \
&& rm -rf /var/lib/apt/lists/*
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
COPY init/wordpress.sh /init/wordpress.sh
# wordpress-git
This image adds WordPress to the lamp-git image, using WP-CLI.
````
sudo docker build -t indiehosters/wordpress-git .
sudo docker run -d -v $(pwd)/data:/data indiehosters/wordpress-git
````
if [ $# -lt 4 ]; then
echo Usage: ./wordpress.sh https://exampledomain.com/ "Example Domain" "example" "example@elsewhere.com"
exit 1
fi
echo Unpacking latest WordPress into /data/www-content...
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php /root/wp-cli.phar --path="/data/www-content" --allow-root core download
php /root/wp-cli.phar --path="/data/www-content" --allow-root core config --dbname=wordpress --dbuser=root
php /root/wp-cli.phar --path="/data/www-content" --allow-root db create
# pwgen is not part of the runtime lamp-git image:
apt-get update
apt-get install -y pwgen
PWD=`pwgen 40 1`
php /root/wp-cli.phar --path="/data/www-content" --allow-root core install \
--url="$1" --title="$2" --admin_user="$3" --admin_password="$PWD" --admin_email="$4" \
--extra-php="define("FS_METHOD","direct"); define("FS_CHMOD_DIR", 0777); define("FS_CHMOD_FILE", 0777);"
#TODO: Debug if/why this is necessary:
php /root/wp-cli.phar --path="/data/www-content" --allow-root user update $3 --user_pass="$PWD"
echo Installing the IndieWeb plugins...
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin delete akismet
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin delete hello
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install wordpress-https
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate wordpress-https
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install indieauth
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate indieauth
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install semantic-linkbacks
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate semantic-linkbacks
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install webmention
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate webmention
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install hum
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate hum
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install https://github.com/pfefferle/wordpress-indieweb-press-this/archive/master.zip
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate wordpress-indieweb-press-this-master
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install https://github.com/dshanske/indieweb-taxonomy/archive/master.zip
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate indieweb-taxonomy-master
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install https://github.com/pfefferle/wordpress-webactions/archive/master.zip
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate wordpress-webactions-master
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install https://github.com/pfefferle/wordpress-webmention-for-comments/archive/master.zip
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate wordpress-webmention-for-comments-master
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install indieweb
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate indieweb
php /root/wp-cli.phar --path="/data/www-content" --allow-root theme install sempress
php /root/wp-cli.phar --path="/data/www-content" --allow-root theme activate sempress
php /root/wp-cli.phar --path="/data/www-content" --allow-root theme install wpsupercache
php /root/wp-cli.phar --path="/data/www-content" --allow-root theme activate wpsupercache
echo Making WordPress content folder writable for the webserver...
chown -R root:www-data /data/www-content
chmod 770 /data/www-content/wp-content
echo "user: $3" > /data/login.txt
echo "pass: $PWD" >> /data/login.txt
echo "Done, login details saved to /data/login.txt"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment