Run Dolibarr in a Kubernetes cluster.
Tuxgasys' Dolibarr Docker image is used. Therefore, Dolibarr will be installed automatically on first start.
- Kubernetes cluster is set up and ready
- Your subdomain points to your Kubernetes cluster
- Kubernetes cluster has a
ClusterIssuer
namedlets-encrypt
set up and ready (may need to be adjusted for your cluster setup)
- Clone this repository and
cd
intodeploy-kubernetes/
- Replace placeholder domain in files with your subdomain:
DOMAIN_DOLI=bills.test.com
sed -i "s/bills.placeholderdomain.com/${DOMAIN_DOLI}/g" ingress.yaml webserver-deployment.yaml
- May adjust
ClusterIssuer
iningress.yaml
- If you want to restrict access to certain IPs, check out the section Further Configuration: Whitelist IPs
- Configure passwords in
env-mysql-secret.yaml
andenv-dolibarr-secret.yaml
(lines are marked by TODO) - May adjust
PersistentVolumeClaim
ininit/*-persistentvolumeclaim.yaml
. Currently, the default storage class of the cluster is used. - Create Kubernetes namespace for dolibarr:
kubectl create namespace dolibarr
- Apply configuration to Kubernetes cluster:
kubectl apply -n dolibarr -f ./init
kubectl apply -n dolibarr -f .
- Make a tee and wait until auto-install of Dolibarr container is finished (can take 5 to 10 min)
- Check if Dolibarr webserver is reachable
Especially in production setups security is important. You may want to restrict access by whitelisting certain IPs or IP ranges. This can be configured in the ingress.yaml
by adding kubernetes.io/ingress.class: nginx
and nginx.ingress.kubernetes.io/whitelist-source-range: "10.0.0.0/24,172.10.0.1"
to annotations. This StackOverflow post provides further details.
For further configuration of Dolibarr check out the environment variables in tuxgasy/docker-dolibarr Readme.
- Backup your volumes - for safety reasons.
- Remove the
install.lock
file in/var/www/documents
volume. - Ensure that env
DOLI_INSTALL_AUTO
is set to1
(unset is also fine due to default value is 1). This ensures the migration of the database to the new version. - Edit Dolibarr deployment in Kubernetes to use the next newer Dolibarr version.
- Check Dolibarr webinterface. After Kubernetes completed applying the new configuration, the new version of Dolibarr should be available.
You can still use the standard way to upgrade through web interface.
- In case special characters are displayed as
?
in generated pdf files: The database should be the collation toutf8_general_ci
. For pdf go to Home->Setup->Other Setup and add this parameter Name->MAIN_PDF_FORCE_FONT
Value->dejavusans
In case of webserver is not reachable or errors, check status and logs:
kubectl get all -n dolibarr
kubectl logs -n dolibarr pod/<pod-name>
- Dolibarr Variable substitution system: https://wiki.dolibarr.org/index.php/Variable_substitution_system