container for strichliste
All checks were successful
ci/woodpecker/push/strichliste Pipeline was successful
ci/woodpecker/tag/strichliste Pipeline was successful

This commit is contained in:
Fritz Grimpen 2024-11-09 19:56:19 +01:00
parent 4197e5b650
commit 7494ba5d36
3 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,25 @@
when:
- event: push
branch: main
path:
- "strichliste/**"
- ".woodpecker/strichliste.yaml"
- event: tag
ref: "refs/tags/strichliste/*"
steps:
- name: build
image: quay.io/buildah/stable
commands:
- buildah build --manifest dev.ccchb.de/ccchb/oci-images/strichliste strichliste/
- buildah manifest push --all dev.ccchb.de/ccchb/oci-images/strichliste oci-archive:/woodpecker/image.tar
privileged: true
- name: push
image: quay.io/skopeo/stable
commands:
- "skopeo copy --dest-creds ccchb:$${FORGEJO_API_TOKEN} oci-archive:/woodpecker/image.tar docker://dev.ccchb.de/ccchb/oci-images/strichliste:$${CI_COMMIT_TAG##strichliste/}"
- "skopeo copy --dest-creds ccchb:$${FORGEJO_API_TOKEN} oci-archive:/woodpecker/image.tar docker://dev.ccchb.de/ccchb/oci-images/strichliste:latest"
secrets:
- FORGEJO_API_TOKEN
when:
event: tag

18
strichliste/Containerfile Normal file
View file

@ -0,0 +1,18 @@
FROM alpine AS builder
WORKDIR /usr/src
RUN apk update && apk add git
ADD https://github.com/strichliste/strichliste/releases/download/v1.8.2/strichliste-v1.8.2.tar.gz .
RUN mkdir strichliste/ && tar -xzf strichliste-v1.8.2.tar.gz -C strichliste/
FROM docker.io/library/unit:php8.2
WORKDIR /var/www/html
RUN docker-php-ext-install -j$(nproc) mysqli
COPY --from=builder --chown=unit:unit /usr/src/strichliste .
COPY config.json /docker-entrypoint.d/config.json

44
strichliste/config.json Normal file
View file

@ -0,0 +1,44 @@
{
"listeners": {
"*:80": {
"pass": "routes"
}
},
"routes": [
{
"match": {
"uri": ["/index.php", "/index.php/*"]
},
"action": {
"pass": "applications/php_app"
}
},
{
"match": {
"uri": ["/api", "/api/*"]
},
"action": {
"rewrite": "/index.php$uri",
"pass": "applications/php_app"
}
},
{
"match": {
"uri": ["/*"]
},
"action": {
"share": "/var/www/html/public$uri",
"fallback": {
"rewrite": "/index.php$uri",
"pass": "routes"
}
}
}
],
"applications": {
"php_app": {
"type": "php",
"root": "/var/www/html/public"
}
}
}