nextcloud: Restart container when dependent services are restarted

This is required because when services are restarted, their Unix domain sockets
are removed and new ones are created. The container will still be using the old
sockets and will fail to connect to the service.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2024-05-06 17:14:38 -04:00
1 parent 6b046ec27d
commit 614bea4511
2 files changed
+7 -2

No files matched your search

+2 -1
View File
@@ -52,10 +52,11 @@ def setup():
VOLUME_NAME: '/var/www/html'
}
env = {'OVERWRITEWEBROOT': '/nextcloud'}
binds_to = ['mariadb.service', 'redis-server.service', 'slapd.service']
action_utils.podman_create(container_name=CONTAINER_NAME,
image_name=IMAGE_NAME, volume_name=VOLUME_NAME,
volume_path=str(_data_path), volumes=volumes,
env=env)
env=env, binds_to=binds_to)
action_utils.service_start(CONTAINER_NAME)
_nextcloud_wait_until_ready()