Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
444c9c3
fix: render podSecurityContext and securityContext in all workload te…
eduardofraga May 26, 2026
5881ae4
Merge pull request #157 from eftechcombr/issue-153-security-context
eduardofraga May 26, 2026
1e136ba
fix: gate Namespace creation behind flag
eduardofraga May 26, 2026
5b487f2
Merge pull request #158 from eftechcombr/issue-154-namespace-rbac
eduardofraga May 26, 2026
277cd1a
fix: add role: primary selector to mariadb-headless service
eduardofraga May 26, 2026
5ae7550
Merge pull request #159 from eftechcombr/155-chart-mariadb-headless-s…
eduardofraga May 26, 2026
97ae048
fix(chart): add Helm hooks and ordering to init Jobs, add wait-for-ma…
eduardofraga May 26, 2026
eee19ce
Merge branch 'latest' into 156-chart-init-jobs-lack-helm-hooks-and-or…
eduardofraga May 26, 2026
28a0f5a
Merge pull request #160 from eftechcombr/156-chart-init-jobs-lack-hel…
eduardofraga May 26, 2026
c70ae5b
docs: sync documentation with current codebase (v11.0.7)
eduardofraga May 26, 2026
458b72c
fix(chart): major Helm chart fixes for v11.0.7-1
eduardofraga May 26, 2026
7c48378
fix(ci): publish job condition was skipping on release events
eduardofraga May 26, 2026
5c076a2
chore(chart): trigger chart release for v11.0.7-1
eduardofraga May 26, 2026
1058b92
fix(chart): move terminationGracePeriodSeconds to pod spec
eduardofraga May 26, 2026
49fee46
docs: sync documentation with current codebase (v11.0.7)
eduardofraga May 26, 2026
0b27167
fix(chart): major Helm chart fixes for v11.0.7-1
eduardofraga May 26, 2026
1b3f69b
fix(ci): publish job condition was skipping on release events
eduardofraga May 26, 2026
0825bf1
chore(chart): trigger chart release for v11.0.7-1
eduardofraga May 26, 2026
7fdd61f
fix(chart): move terminationGracePeriodSeconds to pod spec
eduardofraga May 26, 2026
b145863
Merge pull request #161 from eftechcombr/feature/helm-chart-v11.0.7-1
eduardofraga May 26, 2026
9e0dd35
chore(chart): bump chart version to 11.0.7-2
eduardofraga May 26, 2026
ab06f6f
chore(chart): bump version back to 11.0.7 (recreate with fixes)
eduardofraga May 26, 2026
c0451e8
docs: update README files with current versions and config
eduardofraga May 26, 2026
750e5f5
chore: bump version from 11.0.7 to 11.0.8
eduardofraga Jun 24, 2026
2671cbe
Merge pull request #162 from eftechcombr/11.0.8
eduardofraga Jun 24, 2026
c13acd4
chore(deps): bump actions/checkout from 6 to 7 (#164)
dependabot[bot] Jun 25, 2026
c398420
fix(helm): fix mariadb.enabled=false causing configmap and job failur…
leandrosouza Jul 1, 2026
8cca911
Update Helm publish workflow to clean package directory
eduardofraga Jul 1, 2026
1b5e25e
Update helm chart artifact upload path (#168)
eduardofraga Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
uses: "actions/checkout@v7"
- name: "Update repository description"
uses: "peter-evans/dockerhub-description@v5"
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: ./docker/php/Dockerfile.base
Expand All @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up QEMU
uses: docker/setup-qemu-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: ./docker/nginx/Dockerfile
Expand All @@ -41,7 +41,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up QEMU
uses: docker/setup-qemu-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish-php-fpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: ./docker/php/Dockerfile
Expand All @@ -41,7 +41,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up QEMU
uses: docker/setup-qemu-action@v4
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/helm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Install Helm
uses: azure/setup-helm@v5
Expand All @@ -38,7 +38,7 @@ jobs:
needs: lint
steps:
- name: Check out repository code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Install Helm
uses: azure/setup-helm@v5
Expand All @@ -51,7 +51,9 @@ jobs:
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Create package directory
run: mkdir -p .cr-release-packages
run: |
rm -rf .cr-release-packages
mkdir -p .cr-release-packages

- name: Package Helm chart
run: |
Expand All @@ -62,16 +64,17 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: helm-chart-package
path: .cr-release-packages/*.tgz
path: .cr-release-packages/glpi-${{ steps.chart_version.outputs.version }}.tgz
retention-days: 30
overwrite: true

publish:
runs-on: ubuntu-latest
needs: package
if: github.event.inputs.publish == 'true'
if: ${{ github.event_name == 'release' || github.event.inputs.publish == 'true' }}
steps:
- name: Check out repository code with full history
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@


.env
*/.env
*/.env
values-custom.yaml
*/values-custom.yaml
52 changes: 32 additions & 20 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

## Overview

This repository contains Docker configurations for deploying GLPI (an IT asset management system). The project consists of:
This repository contains Docker and Kubernetes configurations for deploying GLPI (an IT asset management system). The project consists of:
- PHP-FPM base image (`docker/php/Dockerfile.base`)
- PHP-FPM application image (`docker/php/Dockerfile`)
- Nginx reverse proxy (`docker/nginx/Dockerfile`)
- Docker Compose configurations for development and production
- Helm chart for Kubernetes deployment (`kubernetes/glpi/`)

## Build Commands

Expand All @@ -19,8 +20,8 @@ docker-compose -f docker-compose-build.yml build

# Build specific image
docker build -t eftechcombr/glpi:base -f docker/php/Dockerfile.base docker/php/
docker build -t eftechcombr/glpi:php-fpm-11.0.6 -f docker/php/Dockerfile docker/php/
docker build -t eftechcombr/glpi:nginx-11.0.6 -f docker/nginx/Dockerfile docker/nginx/
docker build -t eftechcombr/glpi:php-fpm-11.0.8 -f docker/php/Dockerfile docker/php/
docker build -t eftechcombr/glpi:nginx-11.0.8 -f docker/nginx/Dockerfile docker/nginx/
```

### Run Containers
Expand Down Expand Up @@ -51,15 +52,17 @@ docker build --check docker/php/
docker build --check docker/nginx/

# Scan for secrets (via hadolint --secret)
hadolint --secret支气管 docker/php/Dockerfile.base
hadolint --secret docker/php/Dockerfile.base
```

DeepSource is also configured for automated linting via `.deepsource.toml` (docker, secrets, and shell analyzers).

## Code Style Guidelines

### Dockerfiles

#### General Rules
- Use specific version tags for base images (e.g., `php:8.4.14-fpm-alpine3.22`, not `php:latest`)
- Use specific version tags for base images (e.g., `php:8.4.19-fpm-alpine3.22`, not `php:latest`)
- Pin package versions in Alpine (e.g., `icu-dev=76.1-r1`)
- Always clean up build dependencies with `apk del .build-deps`
- Remove `docker-php-source delete` after installing extensions
Expand All @@ -83,16 +86,16 @@ docker-php-ext-install intl mysqli gd exif bz2 zip ldap opcache bcmath
```

#### Redis Extension
Install via PECL with version pinning:
Install via PECL (version pinning recommended for reproducible builds):
```dockerfile
pecl install redis-6.2.0
pecl install redis
docker-php-ext-enable redis
```

### Docker Compose

#### Version Tagging
- Always use explicit version tags (e.g., `11.0.6`, not `latest`)
- Always use explicit version tags (e.g., `11.0.8`, not `latest`)
- Keep all service image tags synchronized
- Use semantic versioning

Expand Down Expand Up @@ -162,11 +165,11 @@ trap 'echo "Error on line $LINENO"' ERR
### Images
- Lowercase: `eftechcombr/glpi`
- Use kebab-case: `php-fpm`, `nginx`
- Version format: `11.0.6`
- Version format: `11.0.8`

### Services (docker-compose)
- Lowercase with hyphens: `mariadb`, `glpi-db-install`
- Descriptive: `glpi-db-configure`, `glpi-cache-configure`
- Descriptive: `glpi-db-configure`, `glpi-cache-configure`, `glpi-verify-dir`, `glpi-db-upgrade`, `mariadb-timezone`

### Environment Variables
- Uppercase with underscores: `MARIADB_HOST`, `GLPI_VERSION`
Expand All @@ -177,7 +180,7 @@ trap 'echo "Error on line $LINENO"' ERR
When upgrading GLPI or PHP versions:

1. Update `docker/php/Dockerfile.base`:
- PHP version (e.g., `8.4.13` → `8.4.14`)
- PHP version (e.g., `8.4.13` → `8.4.19`)
- Alpine version if needed
- All pinned package versions (verify they exist in Alpine)

Expand All @@ -187,23 +190,32 @@ When upgrading GLPI or PHP versions:
3. Update `docker/.env`:
- `VERSION="11.0.x"`

4. Update `docker/docker-compose.yml`:
4. Update `docker/.env.example`:
- `VERSION="11.0.x"`

5. Update `docker/docker-compose.yml`:
- All image tags

5. Update `docker/docker-compose-build.yml`:
6. Update `docker/docker-compose-build.yml`:
- All image tags

6. Update `docker/nginx/Dockerfile`:
7. Update `docker/nginx/Dockerfile`:
- Base image tag

7. Verify with hadolint:
8. Update `kubernetes/glpi/Chart.yaml`:
- `version:` and `appVersion:` fields

9. Update `kubernetes/glpi/values.yaml`:
- `glpi.version`, `glpi.phpfpm.image.tag`, `glpi.nginx.image.tag`

10. Verify with hadolint:
```bash
hadolint docker/php/Dockerfile.base
hadolint docker/php/Dockerfile
hadolint docker/nginx/Dockerfile
```

8. Test build locally:
11. Test build locally:
```bash
cd docker
docker-compose -f docker-compose-build.yml build base
Expand All @@ -215,10 +227,10 @@ Current pinned versions in `Dockerfile.base` (Alpine 3.22):

| Package | Version |
|---------|---------|
| php base | 8.4.14-fpm-alpine3.22 |
| php base | 8.4.19-fpm-alpine3.22 |
| icu-dev | 76.1-r1 |
| zlib-dev | 1.3.1-r2 |
| libpng-dev | 1.6.55-r0 |
| zlib-dev | 1.3.2-r0 |
| libpng-dev | 1.6.57-r0 |
| bzip2-dev | 1.0.8-r6 |
| libzip-dev | 1.11.4-r0 |
| openldap-dev | 2.6.8-r0 |
Expand All @@ -228,7 +240,7 @@ Current pinned versions in `Dockerfile.base` (Alpine 3.22):
| file | 5.46-r2 |
| g++ | 14.2.0-r6 |
| gcc | 14.2.0-r6 |
| musl-dev | 1.2.5-r10 |
| musl-dev | 1.2.5-r12 |
| make | 4.4.1-r3 |
| pkgconf | 2.4.3-r0 |
| re2c | 4.2-r0 |
Expand Down
36 changes: 23 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Manifest files for building and deploying **GLPI** using containers with Docker
## Supported Containers

- [x] PHP-FPM: `php:8.4.19-fpm-alpine3.22`
- [x] Nginx: `nginxinc/nginx-unprivileged:1.29.1-alpine3.22-slim`
- [x] GLPI PHP: `eftechcombr/glpi:php-fpm-11.0.6`
- [x] GLPI Nginx: `eftechcombr/glpi:nginx-11.0.6`
- [x] Nginx: `nginxinc/nginx-unprivileged:1.27.5-alpine3.21-slim`
- [x] GLPI PHP: `eftechcombr/glpi:php-fpm-11.0.8`

- [x] GLPI Nginx: `eftechcombr/glpi:nginx-11.0.8`
## Quick Start

### Using Helm (Kubernetes)
Expand All @@ -21,7 +21,7 @@ Manifest files for building and deploying **GLPI** using containers with Docker
Add the GLPI Helm chart repository:

```sh
helm repo add glpi https://eftechcombr.github.io/glpi/
helm repo add eftechcombr https://eftechcombr.github.io/glpi/
helm repo update
```

Expand All @@ -31,25 +31,25 @@ helm repo update
Install GLPI using Helm:

```sh
helm install my-glpi glpi/glpi
helm install my-glpi eftechcombr/glpi
```

Or with custom values:

```sh
helm install my-glpi glpi/glpi -f custom-values.yaml
helm install my-glpi eftechcombr/glpi -f custom-values.yaml
```

#### Searching for Available Versions

```sh
helm search repo glpi --versions
helm search repo eftechcombr --versions
```

#### Upgrading the Chart

```sh
helm upgrade my-glpi glpi/glpi
helm upgrade my-glpi eftechcombr/glpi
```

#### Uninstalling the Chart
Expand All @@ -64,7 +64,14 @@ helm uninstall my-glpi
2. Set up environment variables:
```sh
cp docker/.env.example docker/.env
# Edit docker/.env with your desired configuration
```
3. Start the containers:
```sh
cd docker
docker compose up -d
```
GLPI will be accessible at http://localhost:8080

## Credentials

Expand All @@ -75,15 +82,18 @@ cp docker/.env.example docker/.env

### docker-compose

./docker/_env ---> please rename to /docker/.env
./docker/.env.example ---> copy to ./docker/.env and customize

See ./docker/.env for available environment variables including:
- MARIADB_HOST, MARIADB_PORT, MARIADB_DATABASE, MARIADB_USER, MARIADB_PASSWORD
- GLPI_LANG, VERSION, CACHE_DSN
- GLPI_VAR_DIR, GLPI_CONFIG_DIR, GLPI_MARKETPLACE_DIR and other directory paths


### kubernetes

./kubernetes/glpi-configmap.yaml
./kubernetes/glpi-secrets.yaml
./kubernetes/mariadb-configmap.yaml
./kubernetes/mariadb-secret.yaml
See ./kubernetes/glpi/values.yaml for all configurable Helm chart parameters,
including GLPI, MariaDB, Redis, Ingress, and external database settings.



Expand Down
2 changes: 1 addition & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GLPI_LANG="en_US"
VERSION="11.0.5"
VERSION="11.0.8"
GLPI_MARKETPLACE_DIR=/var/www/html/marketplace
GLPI_VAR_DIR=/var/lib/glpi
GLPI_DOC_DIR=/var/lib/glpi
Expand Down
Loading
Loading