Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write multi-line command in heroku procfile

I have a long command line in heroku procfile and want to break it into multiple lines.

Using backslash like below didn't help...

Procfile:

web: java -Dserver.port=$PORT\ 
 -Djavax.net.ssl.keyStoreType=pkcs12\ 
 -Djavax.net.ssl.keyStore=$SOAP_SSL_KEYSTORE_PATH\ 
 -Djavax.net.ssl.keyStorePassword=$SOAP_SSL_KEYSTORE_PASSWORD\ 
 $JAVA_OPTS -jar pwr-mobile-rest-api-jar/target/pwr-mobile-rest-api-jar-runnable.jar

How can I format the procfile for better looking?

like image 591
Игорь Маценко Avatar asked Jun 01 '20 16:06

Игорь Маценко


People also ask

How do I run multiple commands in Procfile?

You can run multiple command inside Procfile using sh -c command : worker: sh -c 'firstCommand && secondCommand && etc...' Notes : Procfile should be at the project root level.


1 Answers

It works

echo \
hello world

It doesnt work

echo\
hello world

Put space before backslash and it should work.

like image 83
Konflex Avatar answered Oct 05 '22 00:10

Konflex