Add which docker-compose to locate the correct path for systemd

This commit is contained in:
root 2022-01-11 13:48:02 +01:00
parent 43bdb23849
commit ce89382a32
1 changed files with 4 additions and 4 deletions

View File

@ -5,11 +5,11 @@ Description=Bridgehead (%i) Service
Restart=always Restart=always
RestartSec=30 RestartSec=30
WorkingDirectory=/srv/docker/bridgehead/%i WorkingDirectory=/srv/docker/bridgehead/
ExecStartPre=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=docker-compose --env-file ../site-config/%i.env up ExecStart=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env up'
ExecStop=docker-compose --env-file ../site-config/%i.env down ExecStop=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env down'
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target