Gitlab "File" Environment Variable - Don't parse ${} on deployment

Hi there, I am currently using the FILE Environment Variable type in order to deploy a service via Gitlab CI/CD. My variables is a configuration file that contains handlebars environment variables. For example:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php %(ENV_APP_DIR)s/artisan queue:work --sleep=3 --tries=3 --queue=${MAJOR_VERSION}_default
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile = /dev/stderr
stderr_logfile_maxbytes=0
user = www-data
autostart = true
autorestart = true
priority = 5
numprocs=2
stopwaitsecs = 20

We chose not to use the “Variable” environment variable type as we would have to insert newlines ourself, and as this config file grows, that becomes hard to manage.

On deployment, it appears these variables in the config are processed before I’m able to export the environment variable inside the .gitlab-ci.yml file.

When debugging, I’m doing “cat $SUPERVISORD_VERSIONED_CONFIG”

My expected outcome would be something like:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php %(ENV_APP_DIR)s/artisan queue:work --sleep=3 --tries=3 --queue=${MAJOR_VERSION}_default
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile = /dev/stderr
stderr_logfile_maxbytes=0
user = www-data
autostart = true
autorestart = true
priority = 5
numprocs=2
stopwaitsecs = 20

My actual outcome is:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php %(ENV_APP_DIR)s/artisan queue:work --sleep=3 --tries=3 --queue=_default
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile = /dev/stderr
stderr_logfile_maxbytes=0
user = www-data
autostart = true
autorestart = true
priority = 5
numprocs=2
stopwaitsecs = 20

I am using gitlab.com for my deployment.

What I’m trying to ask is there anyway really to work around Gitlab parsing these ${} variables inside file variables, or would I have to switch to using the Variable type and maintain that?

Thanks for the help guys