Hi,
I am writing a raw_exec
task running a program that requires several specific files in a folder named ‘resources’ that must be present in the current working directory.
My task configuration goes:
task "my-task" {
driver = "raw_exec"
config {
command = "/path/to/program/binary"
}
template {
source="/path/to/program/resources/file1"
destination="resources/file1"
}
template {
source="/path/to/program/resources/file2"
destination="resources/file2"
}
...
template {
source="/path/to/program/resources/fileN"
destination="resources/fileN"
}
}
This is working fine (with disable_file_sandbox = true for the client), however the number of files is rather large.
I tried replacing individual template blocks file1…fileN with the following:
template {
source="/path/to/program/resources/"
destination="resources/"
}
Which is giving me the error:
Task hook failed template: failed to read template: read /path/to/program/resources: is a directory
Can anyone suggest an approach for what I’m trying to do ?
Thanks,
rema