-
Notifications
You must be signed in to change notification settings - Fork 35
Introducing Podman Quadlets, its automation using vscode tasks, and sanity testing using pytest #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing Podman Quadlets, its automation using vscode tasks, and sanity testing using pytest #197
Changes from 17 commits
859d74a
4b2c251
7d0597d
629e82f
a584929
571cf6f
ad026ea
d7dbced
ac0c6a0
584b6e0
f503254
4c928bb
23cd92e
5ba13a4
7713424
45e3b72
8ab9e78
db5f578
251b8d4
5ae4ab8
fb92eb6
b8486bf
3c1a41d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Every minute | ||
| * * * * * php -f /var/www/html/Jobs/autorelease.php | ||
| * * * * * php -f /var/www/html/Jobs/sendmissedcheckin.php | ||
| * * * * * php -f /var/www/html/Jobs/sendreminders.php | ||
| * * * * * php -f /var/www/html/Jobs/sendwaitlist.php | ||
|
|
||
| # Every day at midnight | ||
| 0 0 * * * php -f /var/www/html/Jobs/sendseriesend.php | ||
| 0 0 * * * php -f /var/www/html/Jobs/sessioncleanup.php | ||
| 0 0 * * * php -f /var/www/html/Jobs/deleteolddata.php |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| MYSQL_ROOT_PASSWORD=db_root_pwd | ||
| TZ=Europe/Zurich | ||
| PUID=1000 | ||
| PGID=1000 | ||
| PGID=1000 | ||
| MYSQL_ROOT_PASSWORD=db_root_pwd | ||
| MYSQL_DATABASE=librebooking | ||
| MYSQL_USER=lb_user | ||
| MYSQL_PASSWORD=db_user_pwd |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ services: | |
| - app | ||
| volumes: | ||
| - app_conf:/config | ||
| - ./crontab:/crontab:ro | ||
| env_file: | ||
| - lb.env | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| __pycache__/ | ||
| *.pyc | ||
| .mypy_cache/ | ||
| .venv/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "python-envs.defaultEnvManager": "ms-python.python:poetry", | ||
| "python-envs.defaultPackageManager": "ms-python.python:poetry" | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,28 +8,22 @@ FROM composer:${VERSION_COMPOSER} AS comp | |||||
| FROM alpine/git:${VERSION_GIT} AS upstream | ||||||
| ARG APP_GH_ADD_SHA=false | ||||||
| ARG APP_GH_REF=refs/heads/develop | ||||||
| ARG GIT_TREE=${APP_GH_REF##*/} | ||||||
| ARG GIT_TREE | ||||||
| ARG UPSTREAM_URL="https://github.com/librebooking/librebooking" | ||||||
| WORKDIR /upstream | ||||||
| RUN <<EORUN | ||||||
| set -eux | ||||||
| git clone ${UPSTREAM_URL} /upstream | ||||||
| git checkout ${GIT_TREE} | ||||||
| if [ "${APP_GH_ADD_SHA}" = "true" ]; then | ||||||
| git describe --tags --long > config/custom-version.txt | ||||||
| fi | ||||||
| rm -rf .git | ||||||
| EORUN | ||||||
| RUN set -eux; \ | ||||||
| GIT_TREE="$(basename "${APP_GH_REF}")"; \ | ||||||
|
||||||
| GIT_TREE="$(basename "${APP_GH_REF}")"; \ | |
| : "${GIT_TREE:=$(basename "${APP_GH_REF}")}"; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my side, I have no issues with the heredoc construct (RUN <<EORUN). I am using Debian-13 (trixie) with podman version 5.4.2.
Could you confirm that podman build fails in your environment? If yes, can you give us more details on your environment (linux distribution, podman version,...) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running the unmodified Dockerfile as it exists in the upstream repo gives the following:
[2/4] STEP 8/15: set -eux
ERRO[0000] +(UNHANDLED LOGLEVEL) &imagebuilder.Step{Env:[]string{"APP_GH_ADD_SHA=false", "APP_GH_REF=refs/heads/develop", "UPSTREAM_URL=https://github.com/librebooking/librebooking", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, Command:"set", Args:[]string{""}, Flags:[]string{}, Attrs:map[string]bool(nil), Message:"SET ", Original:"set -eux"}
Error: building at STEP "SET ": Build error: Unknown instruction: "SET" &imagebuilder.Step{Env:[]string{"APP_GH_ADD_SHA=false", "APP_GH_REF=refs/heads/develop", "UPSTREAM_URL=https://github.com/librebooking/librebooking", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, Command:"set", Args:[]string{""}, Flags:[]string{}, Attrs:map[string]bool(nil), Message:"SET ", Original:"set -eux"}
* The terminal process "/bin/bash '-c', '/home/bar/Development/Projects/Bookme/bookme/scripts/start'" failed to launch (exit code: 125).
The Buildah repo has the following discussion here podman-container-tools/buildah#3474. Theres also a PR for adding heredoc support for RUN .
As to why its still a problem on my machine, I assume it's because im using podman 4.9.3 on Pop OS 24.04 (ubuntu distro) and Ubuntu is yet to have heredoc support as shown in HEREDOC: Not available in 1.33.5 1.33.7 1.34 on Ubuntu, Debian, etc? · Issue #5474 · containers/buildah
podman-container-tools/buildah#5474.
If the inclusion of heredoc is critical, maybe could you tell me what it's intended to achieve and I could come up with a suitable alternative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing critical: it's just that we found heredoc easier to read and less error prone (no need to end each line with ; \.
We switched quite recently to heredoc with librebooking/docker release 3.3.0 and I am not keen on reverting back the heredoc construct...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can propose an alternative: instead of having 2 setup scripts (sys and app) we could have only one. We would call it with 1 argument that would indicate which code to execute. For instance: setup app or setup sys etc… This way, we would have in Dockerfile something like ˋRUN setup sys`.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ikke-t , @JohnVillalovos : what is your opinion? I like Bar's PR and I'd like to put in prod, but we need to fix the heredoc issue that affects users who use an old version of podman...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can propose an alternative: instead of having 2 setup scripts (sys and app) we could have only one. We would call it with 1 argument that would indicate which code to execute. For instance: setup app or setup sys etc… This way, we would have in Dockerfile something like ˋRUN setup sys`.
What do you think?
Hey check my recent commit. I'm calling the script & passing the arguments. No need for a heredox and you get syntax highlighting. Is that satisfactory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who does such an old issue of podman still hit? Seems the discussion is from 2023, so is it valid problem still? Apparently it's a problem if it hits you still.
OTOH, I don't mind how it's done as long as it works. It don't know if it causes useless layer rebuilds in case of nothing changes in dockerfile, or does something not get noticed if e.g. the script changes but Dockerfile doesn't. I haven't really gone so deep into looking what affects rebuilds.
Uh oh!
There was an error while loading. Please reload this page.