...
WordPress deployment project is a fork of https://github.com/bcgov/wordpress and is available on GitHub here: https://github.com/bcgov/wordpress-deploy-digimod
NOTE: Currently OpenShift namespaces are not parameterized, and need to be manually replaced in case of deployment outside of Digimod. Search and replace 0cce6-tools
and c0cce6
with variables for your OpenShift namespace.
To deploy WordPress to OpenShift follow these steps:
Follow instructions in
openshift/templates/images/readme.md
to create base imagesTo build images run builds manually through OpenShift Web UI or use GitHub actions (untested)
Rename image stream tags to
test
orprod
, whichever is appropriate:Code Block oc -n c0cce6-tools tag wordpress-mariadb-run:dev wordpress-mariadb-run:test oc -n c0cce6-tools tag wordpress-nginx-run:dev wordpress-nginx-run:test oc -n c0cce6-tools tag wordpress-wordpress-run:dev wordpress-wordpress-run:test oc -n c0cce6-tools tag wordpress-sidecar-run:dev wordpress-sidecar-run:test
Run
openshift/templates/site-builder.sh
- this will setup config, mariaDB, nginx.
NOTE: side car may not deploy due to resource limits. May need to determine alternative way for doing automatic backups. Interim solution is to backup manually using a backup plugin, such as UpdaraftPlus
Next.JS
Next.JS is responsible for fetching the content from WordPress through the API, parsing the WordPress HTML into React components and serving resulting HTML to the client. On the client, React.js is responsible for re-hydrating any React components for interactive functionality. If the user disables JavaScript, the site is expected to run a standard website instead of a Single Page Application (SPA). Interactive elements, such as accordions should either work through CSS toggles or be accessible without interactive (for example leaving accordions expanded, or rendered differently).
...