Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a7e762b
move yoast/wordpress-seo-premium from require to suggest
chuckadams Nov 18, 2025
415c18f
fair/fair-plugin -> fairpm/fair-plugin
chuckadams Nov 18, 2025
0d51ceb
initial docker config (not yet working)
chuckadams Nov 18, 2025
a95bd28
initial bedrock-based version
chuckadams Nov 20, 2025
5afe81c
add bedrock-autoloader.php to version control
chuckadams Nov 20, 2025
780f7b2
uploads/.gitkeep -> uploads/.gitignore
chuckadams Nov 20, 2025
0fe6b3a
simplify roots/bedrock-disallow-indexing plugin, rm admin notice
chuckadams Nov 22, 2025
0d841ae
set wp_ db prefix and MULTISITE by default
chuckadams Nov 22, 2025
cbbcd9a
add apcu and sqlite3 to platform deps
chuckadams Nov 22, 2025
2d96816
Merge remote-tracking branch 'origin/main' into dockerize
chuckadams Nov 22, 2025
857cc27
add plugin: fairpm/mini-fair-repo
chuckadams Nov 22, 2025
d2e54d7
zap unused or non-vendored plugins and themes
chuckadams Nov 22, 2025
fede941
add vendored and local plugins
chuckadams Nov 22, 2025
5117eb2
fix config for WP_CONTENT_URL
chuckadams Dec 8, 2025
dafd87a
composer require oscarotero/env
chuckadams Dec 8, 2025
313b0cb
install wp-cli and ext-gmp in base image
chuckadams Dec 8, 2025
3efe07d
copy .env.example to .env if necessary
chuckadams Dec 8, 2025
24dfb6b
set MYSQL_DATABASE to wordpress
chuckadams Dec 9, 2025
7d52494
add db port mapping example to override file
chuckadams Dec 9, 2025
10b6d05
aspiredev.org -> local.dev.fair.pm
chuckadams Dec 9, 2025
9c703af
site url is now https://site.local.dev.fair.pm
chuckadams Dec 9, 2025
de3fea0
point caddy at root /app/web
chuckadams Dec 9, 2025
d8125a2
fix path in root index.php
chuckadams Dec 9, 2025
f501b74
fix WP_HOME in .env.example
chuckadams Dec 9, 2025
4aef106
enable healthchecks for db, mount config files in container
chuckadams Dec 9, 2025
c98c1df
add fixup-db-snapshot script
chuckadams Dec 9, 2025
b889e82
fix site_admins list in fixup-db-snapshot
chuckadams Dec 9, 2025
0c246c1
add rewrites to add /wp prefix for badly-behaved core
chuckadams Dec 9, 2025
d885616
run `frankenphp fmt` to shut caddy up about the all-important whitespace
chuckadams Dec 10, 2025
63c510e
add redis extension to docker image
chuckadams Dec 10, 2025
9a3eccc
minifair -> fair-beacon
chuckadams Dec 10, 2025
9494a7a
local.dev.fair.pm -> local.fair.pm
chuckadams Dec 10, 2025
17375ac
drop the 'site.' prefix from local.fair.pm
chuckadams Dec 10, 2025
63042b0
make fixup on wp_site/wp_blogs less silly
chuckadams Dec 10, 2025
c93ab24
add meta/bin/scrape
chuckadams Dec 10, 2025
8302d79
add wpackagist-plugin/fastly 1.2
chuckadams Dec 11, 2025
45d07ef
add some security headers to Caddyfile
chuckadams Dec 28, 2025
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
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ignore everything by default
*

# copy these directories
!bin/
!docker/fairpm-wordpress

# copy these files
!.env
!README.md
!composer.json
!composer.lock

12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
DATABASE_URL='mysql://wp:password@fairpm-db:3306/wordpress'
DB_PREFIX='wp_'

WP_ENV='development'
WP_HOME='https://local.fair.pm'
WP_SITEURL="${WP_HOME}/wp"

# WP_DEBUG_LOG='/path/to/debug.log'

###> Do not remove this comment, and do not add anything under it, as it will be replaced on install <###
AUTH_KEY='generateme'
SECURE_AUTH_KEY='generateme'
LOGGED_IN_KEY='generateme'
NONCE_KEY='generateme'
AUTH_SALT='generateme'
SECURE_AUTH_SALT='generateme'
LOGGED_IN_SALT='generateme'
NONCE_SALT='generateme'
42 changes: 25 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
.env.production
gp-data/
#### ignore all dotfiles and dot-dirs, with exceptions
.*
!.config/
!.distignore
!.dockerignore
!.editorconfig
!.env.example
!.gitattributes
!.gitignore

# Installed via Composer
content/mu-plugins/php-basic-auth/
content/plugins/aws-ses-wp-mail/
content/plugins/fair-plugin/
content/plugins/git-updater/
content/plugins/query-monitor/
content/plugins/wp-redis/
content/plugins/mini-fair-repo/
content/plugins/aspireexplorer/
content/plugins/public-post-preview/
content/plugins/wordpress-seo/
content/plugins/wordpress-seo-premium/
content/themes/fair-parent-theme/
vendor/
wordpress/
#### ignore these patterns
*.bak
*.log
*.tmp
*.local
*.local.*
*.secret
*.secret.*

#### ignore these specific directories
/gp-data/
/vendor/

#### ignore these specific files
auth.json
docker-compose.override.yml
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
# Server
# fair.pm web site

This is the overarching repo for the code deployed to our hosted server, running at https://fair.pm/
This is the overarching repo for the code deployed to our hosted server, running at https://fair.pm/. It will eventually form a template repository for wordpress installations in general, but for now it's specifically configured for the fair.pm site.

## Quick Start for Local Development

## Local Development

This repository is pre-configured with wp-env configuration. (Better Docker Compose setup coming soon!)

You can set up a local environment using:

```sh
# First, install Composer dependencies.
composer install

# Then, start an environment.
npx @wordpress/env start
```
bin/init
bin/up
```

## Local Development

## Deployment
The fair.pm server is built on the [Roots Bedrock](https://roots.io/bedrock/) distribution of WordPress, so all plugins and themes are managed via Composer.

Deployment will eventually be automatic, but in the meantime, the infrastructure team needs to deploy the repository via Helm. Ping them when deployment is needed.
Local development is primarily based on Docker containers, using a FrankenPHP web server container for WordPress, with other support containers defined in `docker-compose.yml`. The default configuration is to expose the server through Traefik at https://local.fair.pm (which always resolves to localhost), but local ports can be used instead by renaming the `docker-compose.override.example.yml` file to `docker-compose.override.yml` and editing it to your needs.

To ignore files from deployment, specify them in `.distignore`.
## Deployment

TODO

## License

Licensed under the GNU General Public License, v2 or later. Copyright 2025 contributors.

Incorporates code from [WordPress/wordpress.org](https://github.com/WordPress/wordpress.org). Licensed under the GNU General Public License, v2 or later. Copyright 2025 contributors.
Incorporates code from [WordPress](https://github.com/WordPress/wordpress.org) and [Roots Bedrock](https://github.com/roots/bedrock). Licensed under the GNU General Public License, v2 or later. Copyright 2025 contributors.
190 changes: 120 additions & 70 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,122 @@
{
"name": "fairpm/server",
"type": "project",
"repositories": {
"my-yoast": {
"type": "composer",
"url": "https://my.yoast.com/packages/"
},
"0": {
"type": "vcs",
"url": "https://github.com/GlotPress/GlotPress"
},
"1": {
"type": "vcs",
"url": "https://github.com/fairpm/mini-fair-repo"
},
{
"type": "vcs",
"url": "https://github.com/aspirepress/AspireExplorer"
},
"2": {
"type": "vcs",
"url": "https://github.com/fairpm/fair-plugin"
},
"3": {
"type": "vcs",
"url": "https://github.com/ocean90/public-post-preview"
}
},
"require": {
"composer/installers": "~2",
"humanmade/php-basic-auth": "^1.1",
"glotpress/glotpress-wp": "^4.0.1",
"johnbillion/query-monitor": "^3.17",
"johnpbloch/wordpress": "^6.8",
"pantheon-systems/wp-redis": "^1.4",
"humanmade/wp-redis-predis-client": "^0.1.2",
"afragen/git-updater": "^12.18",
"fairpm/fair-parent-theme": "~1.0.1",
"humanmade/aws-ses-wp-mail": "dev-master",
"mcaskill/composer-exclude-files": "^4.0",
"yoast/wordpress-seo": "*",
"aspirepress/aspireexplorer": "^0.2",
"fair/fair-plugin": "dev-main",
"ocean90/public-post-preview": "^3.0",
"yoast/wordpress-seo-premium": "^26.0",
"humanmade/s3-uploads": "^3.0"
},
"extra": {
"installer-paths": {
"content/plugins/{$name}/": [
"type:wordpress-plugin"
],
"content/mu-plugins/{$name}/": [
"type:wordpress-muplugin"
],
"content/themes/{$name}/": [
"type:wordpress-theme"
]
},
"exclude-from-files": [
"freemius/wordpress-sdk/start.php"
]
},
"config": {
"allow-plugins": {
"composer/installers": true,
"johnpbloch/wordpress-core-installer": true,
"mcaskill/composer-exclude-files": true
}
}
"name": "fairpm/server",
"type": "project",
"license": "GPL-2.0-or-later",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": [
"wpackagist-plugin/*",
"wpackagist-theme/*"
]
},
{
"type": "vcs",
"url": "https://github.com/GlotPress/GlotPress",
"only": [
"glotpress/glotpress-wp"
]
},
{
"type": "vcs",
"url": "https://github.com/aspirepress/AspireExplorer",
"only": [
"aspirepress/aspireexplorer"
]
},
{
"type": "vcs",
"url": "https://github.com/fairpm/fair-plugin",
"only": [
"fairpm/fair-plugin"
]
},
{
"type": "vcs",
"url": "https://github.com/fairpm/fair-beacon",
"only": [
"fairpm/fair-beacon"
]
},
{
"type": "vcs",
"url": "https://github.com/ocean90/public-post-preview",
"only": [
"ocean90/public-post-preview"
]
},
{
"type": "composer",
"url": "https://my.yoast.com/packages/",
"only": [
"yoast/*"
]
}
],
"require": {
"php": ">=8.4",
"ext-apcu": "*",
"ext-sqlite3": "*",
"afragen/git-updater": "^12.20.2",
"aspirepress/aspireexplorer": "^0.2",
"composer/installers": "~2",
"fairpm/fair-beacon": "dev-main",
"fairpm/fair-parent-theme": "~1.0.5",
"fairpm/fair-plugin": "dev-main",
"glotpress/glotpress-wp": "^4.0.3",
"humanmade/aws-ses-wp-mail": "dev-master",
"humanmade/php-basic-auth": "^1.1.1",
"humanmade/s3-uploads": "^3.0.11",
"humanmade/wp-redis-predis-client": "^0.1.2",
"johnbillion/query-monitor": "^3.20.1",
"mcaskill/composer-exclude-files": "^4.0.1",
"ocean90/public-post-preview": "^3.0.1",
"oscarotero/env": "^2.1.1",
"pantheon-systems/wp-redis": "^1.4.6",
"roots/bedrock-autoloader": "^1.0.4",
"roots/wordpress": "^6.9.0",
"roots/wp-config": "^1.0",
"vlucas/phpdotenv": "^5.6.2",
"wpackagist-plugin/fastly": "^1.2",
"wpackagist-theme/twentytwentyfive": "^1.4",
"yoast/wordpress-seo": ">=26.4"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
},
"suggest": {
"yoast/wordpress-seo-premium": "^26.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"installer-paths": {
"web/app/mu-plugins/{$name}/": [
"type:wordpress-muplugin"
],
"web/app/plugins/{$name}/": [
"type:wordpress-plugin"
],
"web/app/themes/{$name}/": [
"type:wordpress-theme"
]
},
"wordpress-install-dir": "web/wp",
"exclude-from-files": [
"freemius/wordpress-sdk/start.php"
]
},
"config": {
"allow-plugins": {
"composer/installers": true,
"mcaskill/composer-exclude-files": true,
"roots/wordpress-core-installer": true
},
"bump-after-update": true,
"notify-on-install": false,
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
}
}
Loading