-
Notifications
You must be signed in to change notification settings - Fork 6
Add podman support #1
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
Draft
Renarde-dev
wants to merge
7
commits into
main
Choose a base branch
from
podman-quadlet
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
12afc11
Add root quadlet
Renarde-dev c77ec57
Merge branch 'main' into podman-quadlet
Renarde-dev 5ce6af3
Add piwigo data podman quadlet dir in .gitignore
Renarde-dev 757dc1b
Add podman readme
Renarde-dev eed835a
Minor comment change and match main repo image source (Github)
Renarde-dev b8e1de5
Fix typo and link documentation
Renarde-dev 29d3b82
Remove --user from journalctl since it's not on a rootless quadlet
Renarde-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| /piwigo-data/ | ||
| /piwigo-data | ||
| /podman-quadlet/piwigo-data | ||
| /.env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Piwigo podman (Quadlet) | ||
|
|
||
| ## Requirements | ||
|
|
||
| - systemd | ||
| - podman | ||
|
|
||
| ## Usage | ||
|
|
||
| Create `/etc/containers/systemd/piwigo/` and copy each quadlet units files in it. | ||
|
|
||
| ``` | ||
| /etc/containers/systemd/piwigo/ | ||
| ├── piwigo-db.container | ||
| ├── piwigo.container | ||
| └── piwigo.network | ||
| ``` | ||
|
|
||
| Reload systemd units and start the service : | ||
|
|
||
| ```sh | ||
| sudo systemctl daemon-reload | ||
| sudo systemctl start piwigo.service | ||
| ``` | ||
|
|
||
| ### Changing the exposed port : | ||
|
|
||
| Edit `piwigo.container` : | ||
|
|
||
| ```diff | ||
| - PublishPort=8080:80 | ||
| + PublishPort=12345:80 | ||
| ``` | ||
|
|
||
| ### Changing bind-mounts | ||
|
|
||
| Bind mounts are links between the host filesystem and the containers. | ||
| Systemd placeholder are valid in quadlets, `%h` is match the container user home (`/root/`) see [the documentation](#documentation) | ||
|
|
||
| Edit `piwigo.container` : | ||
|
|
||
| ```diff | ||
| - Volume=./piwigo-data/piwigo:/var/www/html/piwigo:z | ||
| - Volume=./piwigo-data/scripts:/usr/local/bin/scripts:z | ||
| + Volume=%h/PiwigoPod/piwigo:/var/www/html/piwigo:z | ||
| + Volume=%h/PiwigoPod/scripts:/usr/local/bin/scripts:z | ||
| ``` | ||
|
|
||
| And edit `piwigo-db.container` : | ||
|
|
||
| ```diff | ||
| - Volume=./piwigo-data/mysql:/var/lib/mysql:z | ||
| + Volume=%h/PiwigoPod/mysql:/var/lib/mysql:z | ||
| ``` | ||
|
|
||
| ### Updating | ||
|
|
||
| Stop and restart your containers, podman should pull an updated image automatically. | ||
|
|
||
| ```sh | ||
| sudo systemctl stop piwigo.service piwigo-db.service | ||
| sudo systemctl daemon-reload | ||
| sudo systemctl start piwigo.service | ||
| ``` | ||
|
|
||
| ### Diagnosing errors | ||
|
|
||
| Access the systemd journal `sudo journalctl -eu piwigo.service`, most common errors are permision issues. | ||
| Ensure that your volume is in a valid location and has read and write permisions. | ||
|
|
||
| ### Documentation | ||
|
|
||
| - [Quadlet unit documentation](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html) | ||
| - [Volume documentation](https://docs.podman.io/en/v4.4/markdown/options/volume.html) | ||
| - [System unit placeholder table](https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Specifiers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Piwigo database container | ||
| [Container] | ||
| Environment=MARIADB_RANDOM_ROOT_PASSWORD=true MARIADB_USER=piwigodb_user MARIADB_DATABASE=piwigodb MARIADB_PASSWORD=PASSWORD | ||
| Image=docker.io/library/mariadb:lts | ||
| Network=piwigo.network | ||
| Volume=./piwigo-data/mysql:/var/lib/mysql:z | ||
|
|
||
| [Service] | ||
| Restart=always | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||||||||||||||||||||||||||||||
| # Piwigo NGINX PHP-FPM container | ||||||||||||||||||||||||||||||||||||||||
| [Unit] | ||||||||||||||||||||||||||||||||||||||||
| Requires=piwigo-db.service | ||||||||||||||||||||||||||||||||||||||||
| After=piwigo-db.service | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [Container] | ||||||||||||||||||||||||||||||||||||||||
| Image=ghcr.io/piwigo/piwigo:latest | ||||||||||||||||||||||||||||||||||||||||
| Network=piwigo.network | ||||||||||||||||||||||||||||||||||||||||
| PublishPort=8080:80 | ||||||||||||||||||||||||||||||||||||||||
| Volume=./piwigo-data/piwigo:/var/www/html/piwigo:z | ||||||||||||||||||||||||||||||||||||||||
| Volume=./piwigo-data/scripts:/usr/local/bin/scripts:z | ||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [Install] | ||||||||||||||||||||||||||||||||||||||||
| WantedBy=multi-user.target | ||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,2 @@ | ||||||||||
| # Piwigo Network | ||||||||||
| [Network] | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.