mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
nextcloud: Pull the image separately before starting systemd unit
This prevents timeout of the service if the image pull is slow. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
6e2db19a26
commit
035d3b49bf
@ -505,6 +505,10 @@ def podman_create(container_name: str, image_name: str, volume_name: str,
|
||||
directory = pathlib.Path('/etc/containers/systemd')
|
||||
directory.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Fetch the image before creating the container. The systemd service for
|
||||
# the container won't timeout due to slow internet connectivity.
|
||||
subprocess.run(['podman', 'image', 'pull', image_name], check=True)
|
||||
|
||||
pathlib.Path(volume_path).mkdir(parents=True, exist_ok=True)
|
||||
# Create storage volume
|
||||
volume_file = directory / f'{volume_name}.volume'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user