Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.2 #43

Merged
merged 25 commits into from
Sep 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d16ab71
Added multisite configuration menu.
soup-bowl Aug 22, 2021
cfa67f3
Display of settings based on settings.
soup-bowl Aug 22, 2021
c6dde93
URL goes to settings page.
soup-bowl Aug 22, 2021
9e12e6d
Settings split with inheritence, fixed settings.
soup-bowl Aug 23, 2021
1f32693
Removed redundant uses.
soup-bowl Aug 23, 2021
a4e2656
Overriding SMTP settings for MS.
soup-bowl Aug 23, 2021
6688aa8
Security array moved into parent.
soup-bowl Aug 23, 2021
0455a4e
Layout adjustements.
soup-bowl Aug 23, 2021
809cbc4
Fixed non-instantiated DB.
soup-bowl Aug 23, 2021
d23f43e
Security choice added as override.
soup-bowl Aug 23, 2021
27efdc3
Merge pull request #42 from soup-bowl/soup-bowl/issue6
soup-bowl Aug 23, 2021
337ecea
Version & changelog adjustments.
soup-bowl Aug 23, 2021
78075e8
Merge branch 'release-1.2' of https://github.com/soup-bowl/wp-simple-…
soup-bowl Aug 23, 2021
1e3dbf5
Dev dependency updates.
soup-bowl Aug 23, 2021
25ca697
Added mock for is_multisite to tests.
soup-bowl Aug 23, 2021
c3d71f1
Removed duplication from classmap.
soup-bowl Aug 23, 2021
51cc234
Readme adjusted for MS changes.
soup-bowl Aug 23, 2021
413db32
in option MS only mode, skip env/defined.
soup-bowl Sep 11, 2021
f82105a
MS conversion script in Docker.
soup-bowl Sep 12, 2021
e2e52f8
Multisite conversion script expanded as quickstart
soup-bowl Sep 12, 2021
bd3090d
Test
soup-bowl Sep 12, 2021
0ba319b
Update readme.md
soup-bowl Sep 12, 2021
c211637
Show what stage has set config.
soup-bowl Sep 12, 2021
db8a603
Integrated with Erase Personal Data (#37).
soup-bowl Sep 12, 2021
004970b
Missed issue ref from changelog.
soup-bowl Sep 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .docker/Dockerfile
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
19 changes: 19 additions & 0 deletions .docker/multisite-htaccess
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
6 changes: 6 additions & 0 deletions .docker/quickstart.sh
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
33 changes: 33 additions & 0 deletions .docker/readme.md
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/
11 changes: 1 addition & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
"description": "Gives WordPress the missing SMTP configuration panel it needed.",
"autoload": {
"classmap": [
"src/class-options.php",
"src/settings/class-settings.php",
"src/settings/class-mailview.php",
"src/mail/class-mail.php",
"src/mail/class-mailtest.php",
"src/mail/class-maildisable.php",
"src/log/class-log.php",
"src/log/class-logservice.php",
"src/log/class-logtable.php",
"src/log/class-logattachment.php"
"src"
]
},
"require-dev": {
Expand Down
Loading