CiviCRM buildkit on Podman
Contents
Since Podman is available in Debian, I decided to play around with it for setting up a CiviCRM development environment with Buildkit. For those not familiar, buildkit is the CiviCRM tooling that helps quickly create test CiviCRM instances, useful for development and for running automated test. Podman is an alternative to Docker developed by RedHat. I decided to use it for no reason in particular. RedHat stuff tends to work well.
Install Podman on Debian
As root, install the package:
|
|
Then edit /etc/containers/registries.conf
to add the following:
|
|
This makes podman pull unknown images from docker.io. Otherwise you can pull them manually. For example:
|
|
Otherwise podman-compose
will error: “mysql:5.7” did not resolve to an alias and no unqualified-search registries are defined in “/etc/containers/registries.conf”.
Getting started with Michael’s docker-compose repo
Clone the git repository:
|
|
Then run the equivalent for docker-compose:
|
|
This will take a few minutes.
Initially when I created my first CiviCRM instance, I ran into a permission denied error during the process, which I fixed by running:
|
|
Then create a CiviCRM instance with:
|
|
You can also use other buildkit profiles, such as wp-demo
instead of standalone-clean
. As the name implies, wp-demo
would create a WordPress site running CiviCRM, instead of just running CiviCRM (Standalone).
When ready, I could login to my instance of CiviCRM using the credentials displayed on screen.
- The hostname generated was: http://standalone-clean.localhost:7979/
- The files are in the current directory, under
build/standalone-clean
- The build takes sadly 1.1 GB of disk space, partly because of the size of the git repositories (over 500 MB are .git directories). I wonder if there is some git magick we could do to reduce that?
What about…
I’m still not sure about a few things:
- Sometimes I want to expose a dev site to the internet, so that a colleague/client can test. I imagine that I can do that with nginx, but I would still need to set the hostname correctly.
- Similarly, sometimes I need to expose to the internet to have an https certificate, because some web technologies require https (ex: for testing U2F).
Author Mathieu Lu
LastMod 2023-11-18