From ce89382a32f727058deaca7b5fa355b8131873b4 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 11 Jan 2022 13:48:02 +0100 Subject: [PATCH] Add which docker-compose to locate the correct path for systemd --- lib/systemd/bridgehead@.service | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/systemd/bridgehead@.service b/lib/systemd/bridgehead@.service index 630d623..8563e4f 100644 --- a/lib/systemd/bridgehead@.service +++ b/lib/systemd/bridgehead@.service @@ -5,11 +5,11 @@ Description=Bridgehead (%i) Service Restart=always RestartSec=30 -WorkingDirectory=/srv/docker/bridgehead/%i +WorkingDirectory=/srv/docker/bridgehead/ -ExecStartPre=docker-compose --env-file ../site-config/%i.env down -ExecStart=docker-compose --env-file ../site-config/%i.env up -ExecStop=docker-compose --env-file ../site-config/%i.env down +ExecStartPre=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env down' +ExecStart=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env up' +ExecStop=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env down' [Install] WantedBy=multi-user.target