Skip to content

Commit

Permalink
Merge branch 'production' into fix/813
Browse files Browse the repository at this point in the history
  • Loading branch information
timiwahalahti authored Sep 20, 2023
2 parents 4c0b244 + e4f6df9 commit 2510c91
Show file tree
Hide file tree
Showing 93 changed files with 3,430 additions and 540 deletions.
13 changes: 13 additions & 0 deletions .docker/config/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"extra": {
"installer-paths": {
"public_html/wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
"public_html/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
"public_html/wp-content/themes/{$name}/": ["type:wordpress-theme"]
}
},
Expand All @@ -25,6 +26,10 @@
"type": "composer",
"url": "https://wpackagist.org/"
},
{
"type": "vcs",
"url": "https://github.com/WordPress/wporg-mu-plugins.git"
},
{
"type": "package",
"package": [
Expand Down Expand Up @@ -119,6 +124,7 @@
"wpackagist-plugin/wp-cldr": "*",
"wpackagist-plugin/wp-super-cache": "*",
"wordpress-meta/wporg-profiles-wp-activity-notifier": "1.1",
"wporg/wporg-mu-plugins": "dev-build",
"wpackagist-theme/p2": "*",
"wpackagist-theme/twentyten": "*",
"wpackagist-theme/twentyeleven": "*",
Expand All @@ -133,5 +139,12 @@
"wpackagist-theme/twentytwentyone": "*",
"wpackagist-theme/twentytwentytwo": "*",
"wpackagist-theme/twentytwentythree": "*"
},
"scripts": {
"post-update-cmd": [
"mkdir -p public_html/wp-content/mu-plugins-private/wporg-mu-plugins/pub-sync",
"mv public_html/wp-content/mu-plugins/wporg-mu-plugins/mu-plugins/utilities public_html/wp-content/mu-plugins-private/wporg-mu-plugins/pub-sync",
"rm -rf public_html/wp-content/mu-plugins/wporg-mu-plugins"
]
}
}
121 changes: 76 additions & 45 deletions .docker/data/wordcamp_dev.sql

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions .docker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,26 @@ Follow these steps to setup a local WordCamp.org environment using [Docker](http
1. Build and boot the Docker environment.
```bash
#
# **** If you have an Apple Silicon CPU, make the edits below _before_ running these commands ****
#
docker compose build --pull
docker compose up
```
_Using an Apple ARM64 chip? You may see `failed to solve: rpc error: code = Unknown desc =...` after running either of commands above. Try adding `platform: linux/amd64` to both `wordcamp.test` and `wordcamp.db` in `docker-compose.yaml`. This will instruct Docker to create an image based on the `linux/amd64` architecture instead of `linux/arm64`, i.e._
_Using an Apple ARM64 (Silicon) chip? You may see `failed to solve: rpc error: code = Unknown desc =...` or `failed to solve: mysql:5.7-debian: no match for platform in manifest` after running either of commands above. Try adding `platform: linux/amd64` to _both_ `wordcamp.test` and `wordcamp.db` in `docker-compose.yaml`. This will instruct Docker to create an image based on the `linux/amd64` architecture instead of `linux/arm64`, i.e._
```
build:
context: .docker
dockerfile: Dockerfile.php-fpm
platform: linux/amd64
wordcamp.test:
build:
context: .docker
dockerfile: Dockerfile.php-fpm
platform: linux/amd64
wordcamp.db:
build:
context: .docker
dockerfile: Dockerfile.mysql
platform: linux/amd64
```
Expand Down
16 changes: 13 additions & 3 deletions .docker/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
const EVENTS_NETWORK_ID = 2;
const EVENTS_ROOT_BLOG_ID = 47;

switch ( $_SERVER['HTTP_HOST'] ) {
switch ( strtolower( $_SERVER['HTTP_HOST'] ) ) {
case 'events.wordpress.test':
define( 'SITE_ID_CURRENT_SITE', EVENTS_NETWORK_ID );
define( 'BLOG_ID_CURRENT_SITE', EVENTS_ROOT_BLOG_ID );
define( 'DOMAIN_CURRENT_SITE', 'events.wordpress.test' );
define( 'SUBDOMAIN_INSTALL', false );
define( 'NOBLOGREDIRECT', 'https://events.wordpress.test' );
// NOBLOGREDIRECT is intentionally omitted so that the 404 template works.
define( 'CLI_HOSTNAME_OVERRIDE', 'events.wordpress.test' );
break;

Expand Down Expand Up @@ -119,9 +119,18 @@
define( 'EMAIL_CENTRAL_SUPPORT', '[email protected]' );

$trusted_deputies = array(
3, // role-tester.
6, // contributorrole.
);

$wcorg_subroles = array(
// contributorrole.
6 => array(
'wordcamp_wrangler',
'meetup_wrangler',
'mentor_manager',
'report_viewer',
),
);

/*
* Third party services
Expand Down Expand Up @@ -168,6 +177,7 @@
define( 'WORDCAMP_PAYMENT_STRIPE_PUBLISHABLE_LIVE', '' );
define( 'WORDCAMP_PAYMENT_STRIPE_SECRET_LIVE', '' );

define( 'WORDCAMP_PROD_GOOGLE_MAPS_API_KEY', '' );
define( 'WORDCAMP_DEV_GOOGLE_MAPS_API_KEY', '' );

define( 'MEETUP_API_BASE_URL', 'https://api.meetup.com/' );
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.docker/database
.docker/wordcamp*.pem
.docker/test_suite
docker-compose.override.yaml


#
Expand Down Expand Up @@ -108,3 +109,4 @@ public_html/wp-content/themes/twentytwenty
public_html/wp-content/themes/twentytwentyone
public_html/wp-content/themes/twentytwentytwo
public_html/wp-content/themes/twentytwentythree
public_html/wp-content/themes/wporg-parent-2021
22 changes: 18 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,34 @@
"_comment": "Work around `test:watch` timeout, see https://github.com/spatie/phpunit-watcher/issues/63#issuecomment-545633709",
"process-timeout": 0,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true
}
},
"extra": {
"installer-paths": {
"public_html/wp-content/themes/{$name}": ["wporg/wporg-parent-2021"]
}
},
"repositories": [
{
"type": "vcs",
"url": "[email protected]:WordPress/wporg-parent-2021.git"
}
],
"require": {
"adhocore/jwt": "^1.0"
"adhocore/jwt": "^1.0",
"wporg/wporg-parent-2021": "dev-build"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"wp-coding-standards/wpcs": "2.*",
"wp-coding-standards/wpcs": "~3.0.0",
"phpcompatibility/phpcompatibility-wp": "*",
"phpunit/phpunit": "^9",
"sirbrillig/phpcs-changed": "2.10.0",
"spatie/phpunit-watcher": "^1.23",
"yoast/phpunit-polyfills": "^1.0"
"yoast/phpunit-polyfills": "^1.0",
"composer/installers": "^2.2"
},
"scripts": {
"format": "phpcbf -p",
Expand Down
Loading

0 comments on commit 2510c91

Please sign in to comment.