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"] # @var droneci_no_proxy: $ ["drone-server", "drone-agent"]
droneci_no_proxy: [] droneci_no_proxy: []
droneci_docker_compose_bin: /usr/local/bin/docker-compose

View File

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

View File

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