Deploy WordPress on the Bitpoke Stack

Find out how to deploy your WordPress code to the Bitpoke Stack.

Requirements

Getting started

Deploying a site is as simple as following these three steps:

  1. Add the Bitpoke helm chart repository
$ helm repo add bitpoke https://helm-charts.bitpoke.io
$ helm repo update
  1. Deploy a site, with main domain pointing to example.com
$ helm upgrade -i my-site bitpoke/wordpress-site --set site.domains[0]=example.com
  1. Point the domain to the ingress IP
$ kubectl get -n bitpoke-system service stack-nginx-ingress-controller

Deploy a site from a git repository

NOTE

Deploying from git repository requires that your WP_CONTENT_DIR is checked in. If you want to use Bedrock it is highly recommended that you deploy using a docker image.

Deploying from git is as simple as:

$ helm upgrade -i my-site bitpoke/wordpress-site --set site.domains[0]=example.com \
	--set code.git.repository=https://github.com/bitpoke/stack-example-wordpress.git \
	--set code.git.reference=master
  • code.git.repository is a valid git repository origin. It supports HTTP, HTTPS, GIT and the SSH protocol.
  • code.git.reference reference to deploy. It can be a commit, branch or tag and defaults to master

Using a private repository

In order to use a private repository, you must generate a SSH key pair and set the private to the deployment. To do that, you need to add --set-file code.git.ssh_private_key=PATH_TO_THE_PRIVATE_KEY:

$ ssh-keygen -f id_rsa -P ''
$ helm upgrade -i my-site bitpoke/wordpress-site --set site.domains[0]=example.com \
	--set code.git.repository=https://github.com/bitpoke/stack-example-wordpress.git \
	--set code.git.reference=master \
	--set-file code.git.ssh_private_key=id_rsa

Deploy a custom Docker image

You can run a custom image, bundled with your own code and dependencies. You can specify it when deploying by setting image.repository and image.tag.

$ helm upgrade my-site bitpoke/wordpress-site --reuse-values \
	--set image.repository=hub.docker.com/r/bitpoke/wordpress-runtime
	--set image.tag=5.8.2