{"id":15524958,"url":"https://github.com/ericmann/blog-stack","last_synced_at":"2025-04-04T11:43:14.954Z","repository":{"id":236359285,"uuid":"440320901","full_name":"ericmann/blog-stack","owner":"ericmann","description":"Docker stack configuration for highly-available WordPress","archived":false,"fork":false,"pushed_at":"2024-04-26T16:31:45.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T21:31:57.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"VCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-20T22:16:20.000Z","updated_at":"2024-04-26T16:32:41.000Z","dependencies_parsed_at":"2024-04-26T18:40:49.331Z","dependency_job_id":"533f9cd4-0d96-43d8-853f-e6d7e105aa0f","html_url":"https://github.com/ericmann/blog-stack","commit_stats":null,"previous_names":["ericmann/blog-stack"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fblog-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fblog-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fblog-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fblog-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericmann","download_url":"https://codeload.github.com/ericmann/blog-stack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174377,"owners_count":20896074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:53:38.376Z","updated_at":"2025-04-04T11:43:14.922Z","avatar_url":"https://github.com/ericmann.png","language":"VCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog Stack\n\nDocker stack configuration for highly-available WordPress.\n\n## Components\n\nAll you really need is a database, but to make sure WordPress is running at peak efficiency we're shipping multiple, individually containerized components.\n\n**WordPress** itself is running as a container built atop the [official WordPress Docker image](https://hub.docker.com/_/wordpress). Specifically, we're using the image built atop PHP 8.3 using Apache. The `Dockerfile` in this project leverages that image but also adds in the Memcached extension for better object caching.\n\n**Memcached** is used as a fast, lightweight, in-memory object cache to enhance WordPress' performance.\n\n**MySQL** is the backing database for the project.\n\n**Varnish** is reverse proxy that acts as an \"application accelerator\" to further enhance front-end performance of your WordPress site.\n\n## State Management\n\nFor WordPress itself, the largetst container of state is the MySQL database. Within Docker, we're mounting this as a persistent volume to ensure nothing is lost during container reloads or builds.\n\nThe WordPress filesystem is also stored in a volume, but is mounted directly from a path on the _host_ to ensure you have full visibility into the code running on your server. This makes managing plugins a bit easier and allows you to manipulate certain things _live_ if necessary.\n\nIt also makes backing up your uploads directory a bit easier, too!\n\n## Configuration\n\nCopy the `.env.example` file to `.env` and set your database username and password accordingly. You'll also want to set a root password should the `root` user ever be needed.\n\nEnsure you map the WordPress data path to an appropriate location on your host filesystem as that's where all of the PHP files and image uploads for your blog will live.\n\n## Recommended Plugins\n\nThe stack itself will install vanilla WordPress. Further configuring your environment with themes and plugins is up to you. However, to get the best use of the system, you'll want to install the following:\n\n### [Batcache](https://wordpress.org/plugins/batcache/)\n\nBatcache is a full-page cache for the front-end of your site. Paired with an in-memory object cache and a reverse proxy like Varnish it makes your site _lightning_ quick.\n\nNote that merely installing the plugin isn't a typical install. You'll need to move `advanced-cache.php` to your `/wp-content` directory and then add the following like to your `wp-config.php` file:\n\n```\ndefine( 'WP_CACHE', true );\n```\n\nYou can then place the `batcache.php` file in your `/wp-content/plugins` directory to make the Batcache Manager plugin (which helps improve cache integration) available for activation.\n\n### [Jetpack](https://wordpress.org/plugins/jetpack/)\n\nThis is an entirely optional (and somewhat opinionated) recommendation. However, Jetpack avails the entire WordPress.com CDN to your site. This means media uploads will be cached at and delivered by a separate edge server rather than your Docker installation.\n\nIf you're running a beefy server, it's likely not necessary. If your blog lives on a Raspberry Pi or somewhere else in your home lab, offloading media serving to a larger CDN will save you a headache.\n\n### [Proxy Cache Purge](https://wordpress.org/plugins/varnish-http-purge/)\n\nThis plugin helps manage your Varnish cache. Install it, then navigate to the settings page within your WordPress Admin. You'll need to set the \"custom IP\" to `varnish` so the plugin knows how to talk to the cache.\n\n### [wordpress-pecl-memcached-object-cache](https://github.com/tollmanz/wordpress-pecl-memcached-object-cache)\n\nThis isn't a traditional plugin. Merely place the `object-cache.php` file from the project into your `/wp-content` folder to add the plugin. To actually enable it, add the following code to your `wp-config.php` file (prior to the `require_once ABSPATH . 'wp-settings.php';` line):\n\n```\nglobal $memcached_servers;\n$memcached_servers = array(\n    array(\n        'memcache', // Memcached server IP address\n        11211       // Memcached server port\n    )\n);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmann%2Fblog-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericmann%2Fblog-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmann%2Fblog-stack/lists"}