abraunegg / abraunegg/onedrive
Feature Request: document Podman Quadlet as an alternative to `podman generate systemd`
- Ngôn ngữ chính
- D
- Star
- 12.8k
- Fork
- 912
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 25
Mô tả
### Is your feature request related to a problem? Please describe.
Since Podman 4.4, Quadlet is the recommended way to run containers as systemd services, replacing the manual `podman generate systemd --new` workflow currently documented.
It is declarative, does not require root to install the unit file, and integrates auto-update via a dedicated directive instead of a label.
### Describe the solution you'd like
**Prerequisites**
- Podman >= 4.4 (which is almost always true today)
- The container has already been authorized once (see step 5 of the existing guide) so that `refresh_token` exists in the config volume.
- The target data directory must exist beforehand:
```bash
mkdir -p ~/OneDrive
```
**Quadlet unit** — `~/.config/containers/systemd/onedrive.container`:
```ini
[Unit]
Description=OneDrive Client for Linux (Podman quadlet)
After=network-online.target
[Container]
Image=docker.io/driveone/onedrive:edge
ContainerName=onedrive
Volume=%h/.config/onedrive:/onedrive/conf:U,Z
Volume=%h/OneDrive:/onedrive/data:U,Z
Environment=ONEDRIVE_THREADS=2
PodmanArgs=--userns=keep-id
AutoUpdate=registry
[Service]
Restart=on-failure
[Install]
WantedBy=default.target
```
**Enable and start:**
```bash
systemctl --user daemon-reload
systemctl --user enable --now onedrive.service
```
**Enable scheduled auto-update** (equivalent to the existing `podman-auto-update.timer` documented for the `generate systemd` method):
```bash
systemctl --user enable --now podman-auto-update.timer
```
### Describe alternatives you've considered
I have considered manual podman container installation.
It has not the possibility to auto-update, that is a feature of the Quadlet without any additional effort.
### Additional context
The solution proposed would allow ensuring using the latest version of the software, with minimal effort on the system.
To create the authorization token, the user would need to run first
```bash
podman run -it --name onedrive --user "$(id -u):$(id -g)" \
--userns=keep-id \
-v $HOME/.config/onedrive:/onedrive/conf:U,Z \
-v $HOME/OneDrive:/onedrive/data:U,Z" \
docker.io/driveone/onedrive:edge
```
Happy to submit this as a PR to `docs/podman.md` if maintainers are interested.
Hướng dẫn đóng góp
Hướng nghiên cứu
Issue này liên quan đến việc cập nhật tệp tài liệu `docs/podman.md`. Trước tiên, hãy đọc hướng dẫn hiện có để hiểu workflow hiện tại của `podman generate systemd`. Sau đó, tích hợp ví dụ Quadlet được cung cấp, đảm bảo các điều kiện tiên quyết và lệnh được giải thích rõ ràng. Xác minh các thay đổi bằng cách kiểm tra định dạng và đảm bảo tất cả các bước (ủy quyền, tạo thư mục, bật các service) đều được bao gồm. Công việc hoàn tất khi tài liệu phản ánh phương pháp được khuyến nghị mới.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- cli, documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 75/100