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

Update/gatsby wordpress #612

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 28 additions & 18 deletions templates/gatsby-wordpress/files/.platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
"https://www.{default}/":
# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.

"https://api.{default}/":
type: upstream
upstream: "gatsby:http"
id: "api"
upstream: "api:http"
cache:
enabled: true
# Base the cache on the session cookies. Ignore all other cookies.
cookies:
- '/^wordpress_logged_in_/'
- '/^wordpress_sec_/'
- 'wordpress_test_cookie'
- '/^wp-settings-/'
- '/^wp-postpass/'

"https://{default}/":
type: redirect
to: "https://www.{default}/"
"https://www.api.{default}/":
type: redirect
to: "https://{default}/"

"https://backend.{default}/":
type: upstream
upstream: "wordpress:http"
cache:
enabled: true
# Base the cache on the session cookies. Ignore all other cookies.
cookies:
- '/^wordpress_logged_in_/'
- '/^wordpress_sec_/'
- 'wordpress_test_cookie'
- '/^wp-settings-/'
- '/^wp-postpass/'
- '/^wp-resetpass-/'
https://www.{default}/:
type: redirect
to: "https://{default}/"
https://{default}/:
type: upstream
primary: true
id: "client"
upstream: "gatsby:http"
5 changes: 4 additions & 1 deletion templates/gatsby-wordpress/files/.platform/services.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
db:
type: mariadb:10.4
disk: 512
disk: 1024
files:
type: network-storage:1.0
disk: 256
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.yml]
indent_style = space

[{*.yml,*.js,*.yaml}]
indent_size = 2

[*.md]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ mounts:
"wordpress/wp-content/uploads":
source: local
source_path: "uploads"

hooks:
build: |
set -e
# Copy manually-provided plugins into the plugins directory.
# This allows manually-provided and composer-provided plugins to coexist.
rsync -a plugins/* wordpress/wp-content/plugins/
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
"require": {
"php": ">=5.6.20",
"johnpbloch/wordpress-core-installer": "^1.0 || ^2.0",
"johnpbloch/wordpress-core": "5.6.0",
"johnpbloch/wordpress-core": "^5.6.0",
"platformsh/config-reader": "^2.4",
"wp-cli/wp-cli-bundle": "^2.4",
"psy/psysh": "^0.10.6"
"wpackagist-plugin/wp-gatsby": "^2.3.3",
"wpackagist-plugin/wp-graphql": "^1.8.2"

},
"config": {
"allow-plugins": {
Expand All @@ -37,10 +38,10 @@
}
},
"scripts": {
"copywpconfig": [
"cp wp-config.php wordpress/"
"subdirComposer": [
"cp wp-config.php wordpress/ && rm -rf wordpress/wp-content/wp-content"
],
"post-install-cmd": "@copywpconfig"
"post-install-cmd": "@subdirComposer"
},
"extra": {
"installer-paths": {
Expand Down
Loading