Skip to content

Add kubernetes example#145

Open
ikke-t wants to merge 4 commits intoLibreBooking:masterfrom
ikke-t:142_kubernetes
Open

Add kubernetes example#145
ikke-t wants to merge 4 commits intoLibreBooking:masterfrom
ikke-t:142_kubernetes

Conversation

@ikke-t
Copy link
Collaborator

@ikke-t ikke-t commented Feb 6, 2026

Kube example for #142

@colisee colisee self-assigned this Feb 7, 2026
@colisee
Copy link
Collaborator

colisee commented Feb 7, 2026

Why do we need a ConfigMap with the content of the config-dist.php file ?

@ikke-t
Copy link
Collaborator Author

ikke-t commented Feb 7, 2026

The starter script copies the config.dist.php to config.php. This way the config can be pre-populated by setting them in dist file before the copy to config. I could add that this is not mandatory.

See here

cp /var/www/html/config/config.dist.php /config/config.php

@ikke-t
Copy link
Collaborator Author

ikke-t commented Feb 7, 2026

I explained it and marked it optional.

@ikke-t
Copy link
Collaborator Author

ikke-t commented Feb 7, 2026

I keep copy of the working config.php, and thus can start from fresh install at any time. It's useful for that. While having db dump saved also of course.

@colisee
Copy link
Collaborator

colisee commented Feb 7, 2026

You wrote This part is optional and useful only if you start from scratch and want to have all the proper config in place at the first boot.

For your information, all the settings in config.php can be overridden by their associated LB_XXX environment variables, as you can see in file lb.env (where I set some of them). This is a feature that was introduced by librebooking/app from v4.0.0. Maybe, it would be more consistent to stick to the LB_XXX override in Kubernetes/openshift and drop the ConfigMap feature...

By the way, could Kubernetes/openshift be configured to use the environment file lb.env? If yes, then I would suggest we use it as well

In parallel, I am re-writing the docker part to have the .examples directory consistent with the new content.

@ikke-t
Copy link
Collaborator Author

ikke-t commented Feb 7, 2026

Ah, I thought it's only the small subset of env variables used at examples. I recall I saw something mentioning it at some point now that you say. It doesn't even need to be in configMap, they can be directly in the deployment file. I will remove the configMap and give an example of setting them in deployment config.

I personally avoid using env vars for anything secret. I've seen many apps dump it's env to browser when they crash. I wonder if that can happen with php? Anyhow, perhaps this is just personal bad memory.

I'll push the changes soon.

@ikke-t
Copy link
Collaborator Author

ikke-t commented Feb 7, 2026

That was good idea, thanks. Example is cleaner this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants