add variable for compose binary
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2019-11-24 23:07:26 +01:00
parent 8e7afe4015
commit d58e54dc2f
3 changed files with 7 additions and 4 deletions

View File

@ -58,3 +58,5 @@ droneci_gitea_skip_verify: False
# @var droneci_no_proxy: $ ["drone-server", "drone-agent"]
droneci_no_proxy: []
droneci_docker_compose_bin: /usr/local/bin/docker-compose

View File

@ -17,6 +17,7 @@
owner: root
group: root
mode: 0644
validate: "{{ droneci_docker_compose_bin }} -f %s config -q"
notify: __drone_restart
- name: Create systemd unit files

View File

@ -9,11 +9,11 @@ After=docker.service
Restart={{ droneci_restart_policy }}
WorkingDirectory={{ droneci_service_directory }}
ExecStartPre=/usr/local/bin/docker-compose down
ExecStartPre=/usr/local/bin/docker-compose rm -f
ExecStartPre={{ droneci_docker_compose_bin }} down
ExecStartPre={{ droneci_docker_compose_bin }} rm -f
ExecStart=/usr/local/bin/docker-compose up
ExecStop=/usr/local/bin/docker-compose down
ExecStart={{ droneci_docker_compose_bin }} up
ExecStop={{ droneci_docker_compose_bin }} down
[Install]
WantedBy=multi-user.target