abraunegg / abraunegg/onedrive

Feature Request: document Podman Quadlet as an alternative to `podman generate systemd`

Abierto
#3,817 1 comentario 0 reacciones 0 asignados Ver en GitHub
Feature Request Needs Work PR Provided - Needs Testing Waiting on Response
Lenguaje dominante
D
Estrellas
12.8k
Forks
911
Merge medio
1 d 8 h
PR fusionados (30 d)
25

Descripción

### 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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.