I have deployed a docker instance and I have created a service to run it at boot with the command
@ execute = (execline-cd /home/wastelander/foo-docker docker-compose up) 
. However setting and absolute path is not the best practice, because the service is not really "portable" and if I change user of course it won't work. Is there a way to put an environment variable in the execline command? For example can I replace /home/wastelander with /home/$USER or something?
Maybe make it into a module type service and use an I variable enabling docker@ wastelander ?
Thanks Skatanafas, it is a possibility, however in this case I should create a file with the name of my user so that the service should replace @ with wastelander. I would like to know if there is one more general option
UPDATE : easy and dirty solution, @ shebang =usr/bin/zsh and @ execute = (cd /home /$USER/docker-foo & & Docker-compose up). Let's wait for Eric to suggest something less ugly :D
You have multiple ways to achieve this. I give you one of them.

First, define the name of your frontend file as docker-foo@ .
Now at your @ execute field do:
@ execute = (execline-cd /home/@ I/foo-docker docker-compose up) 
Finally at your enable time, do
# 66-enable docker-foo@ wastelander
the parser will replace all @ I occurrence found inside the frontend file by wastelander. So, your execline-cd /home/@ I/foo-docker becomes execline-cd /home/wastelander/foo-docker at the end of the enable process.
thanks @ eric, I have also found another way with a very long command, but that at least does not need a custom build and can use the usual generic notation for the home directory:
@ execute = ( execl-cmdline -s { docker-compose -f ~/searxng-docker/docker-compose.yaml up --remove-orphans } )
So now I have a good range of solutions to chose among, marking as solved.

Powered by Obarun