-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from soup-bowl/release-1.2
Release 1.2
- Loading branch information
Showing
16 changed files
with
856 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
FROM wordpress:php7.4-apache | ||
|
||
RUN curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar --output /usr/bin/wp \ | ||
&& chmod +X /usr/bin/wp \ | ||
&& chmod 766 /usr/bin/wp | ||
|
||
RUN pecl install xdebug-3.0.1 | ||
ADD ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini | ||
|
||
ADD ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini | ||
ADD ./quickstart.sh /usr/bin/quickstart | ||
ADD ./multisite-htaccess /opt/wpss/htaccess | ||
|
||
RUN chmod +x /usr/bin/quickstart | ||
|
||
EXPOSE 9003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# BEGIN WordPress Multisite | ||
# Using subfolder network type: https://wordpress.org/support/article/htaccess/#multisite | ||
|
||
RewriteEngine On | ||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | ||
RewriteBase / | ||
RewriteRule ^index\.php$ - [L] | ||
|
||
# add a trailing slash to /wp-admin | ||
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | ||
|
||
RewriteCond %{REQUEST_FILENAME} -f [OR] | ||
RewriteCond %{REQUEST_FILENAME} -d | ||
RewriteRule ^ - [L] | ||
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] | ||
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] | ||
RewriteRule . index.php [L] | ||
|
||
# END WordPress Multisite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/bash | ||
wp core install --url="localhost" --title="Development" --admin_user="admin" --admin_password="password" --admin_email="code@example.com" --skip-email --allow-root | ||
if [ "$1" == "ms" ]; then | ||
rm /var/www/html/.htaccess && cp /opt/wpss/htaccess /var/www/html/.htaccess | ||
wp core multisite-install --title="abc" --admin_email="code@soupbowl.io" --allow-root | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Development quickstart with Docker | ||
This plugin has designed to be ready to go with [Docker] (using [docker-compose][compose]) very quickly. All you need is Docker and docker-compose to be installed on **any platform**. | ||
|
||
If you're using **Visual Studio Code**, the [Docker extension][ext] removes a lot of the CLI steps. | ||
|
||
## Start-up | ||
Simply run the following code in the root of the cloned Git directory. | ||
|
||
``` | ||
docker-compose up --build -d | ||
``` | ||
This does the following: | ||
* Reads the docker-compose.yml root file to see what images and setups we need (web, db, mail mocker). | ||
* `build` instructs compose to re-build the custom images. Not always needed, but essential if you change the Dockerfile. | ||
* `d` returns the TTL back to you. If omitted, you will start seeing on-the-fly logs from each container. | ||
|
||
If no errors occur, you'll now have the following local bindings: | ||
* WordPress on port 80 & 443 (default) - visting http://localhost should load up the WordPress installer. | ||
* Database with an auto-login phpMyAdmin instance on http://localhost:8082. | ||
* Mail mocker, with the SMTP server on port 1025 (8083 for outside-container usage), and the GUI on http://localhost:8081. | ||
|
||
## Quickstart Script | ||
To speed this up even more, I've included a small script that interfaces with [WP CLI][cli] to bypass the 5 minute install process. This will give you a basic functioning WordPress site with typically default development installation choices. The username is **admin** and the password is **password**. | ||
|
||
* For a regular install, run `docker-compose exec www quickstart`. | ||
* For a multisite instance, run `docker-compose exec www quickstart ms`. | ||
|
||
This **does not setup SMTP**, to avoid impeding testing procedures. You'll still need to do that. | ||
|
||
[docker]: https://www.docker.com/ | ||
[compose]: https://docs.docker.com/compose/ | ||
[ext]: https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker | ||
[cli]: https://wp-cli.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.