Podman Quadlets
เนื้อหานี้ยังไม่มีในภาษาของคุณ
This guide will help you set up QSM.Web within Podman using Podman Quadlets. If you prefer Docker Compose, Refer to the Docker guide and adjust commands accordingly. Please note that all servers will run inside the container, so this method does not solve the lack of separation of concerns issue.
Since Podman does not have a daemon unlike Docker, Podman Quadlet integrates with systemd and allows Podman containers to start directly on startup.
Prerequisites
Section titled “Prerequisites”- Podman
- Git
Short Version
Section titled “Short Version”For CLI/script masters who do not wish to read through the explanation:
cd ~git clone https://github.com/lines-of-codes/QSMSharp.gitcd QSMSharpsudo cp -r ./misc/quadlet-build/* /etc/containers/systemd/cd /etc/containers/systemdsudo sed -i -e "s|# Replace this|$HOME/QSMSharp|" qsm-web.buildsudo mkdir /var/lib/qsm-websudo systemctl daemon-reloadsudo systemctl start qsm-webYou can, of course, replace the source location to a proper location instead of dumping it in your home folder.
-
Choose a location to place QSMSharp’s source, it can simply be your home folder (
cd ~), or somewhere like/usr/local/lib, thencdinto it. -
Clone the Git repository and go into the directory by running:
Terminal window git clone https://github.com/lines-of-codes/QSMSharp.gitcd QSMSharp -
In the cloned repository, The folder
misc/quadlet-buildcontains Podman Quadlet files, Which you can simply copy as such:Terminal window sudo cp -r ./misc/quadlet-build/* /etc/containers/systemd/ -
Now, Edit the file
/etc/containers/systemd/qsm-web.buildand edit the following line:SetWorkingDirectory=# Replace thisReplacing the comment
# Replace thiswith the location of QSMSharp. For example:SetWorkingDirectory=/home/example/QSMSharp -
Create the data storage location for QSM.Web:
Terminal window sudo mkdir /var/lib/qsm-webIt can also be other locations, See Change data location
-
Run
systemd daemon-reloadand runsystemctl start qsm-web. It will take a bit long as this will build the container.
Note that QSM Web will now be enabled to run on startup by default. If you
wish to change that, or change the installation target (by default installs to
default.target), edit /etc/containers/systemd/qsm-web.container and run
systemctl daemon-reload.
Short Maintenance Guide
Section titled “Short Maintenance Guide”You’ll have to run systemctl daemon-reload every time you edit the files
inside /etc/containers/systemd/.
To update QSM.Web, Simply run git pull within the project’s directory and
run systemctl restart qsm-web.
Or you may want to go to a specific commit, you can do that by running
git checkout <commit> instead. (For example, git checkout 4eeca32)
Data Location
Section titled “Data Location”You can edit the /etc/containers/systemd/qsm-web.container file to change the
default server location storage. For example, If you wish to use
/mnt/storage/qsm-web instead, change it as follows:
Volume=/var/lib/qsm-web:/var/lib/qsm-webVolume=/mnt/storage/qsm-web:/var/lib/qsm-webRemember to run systemctl daemon-reload and then restart the service.