Azure App Services Linux: how to cd to a the wwwroot directory at startup
up vote
0
down vote
favorite
I've deployed an app to Azure App Services Linux and setup the startup command in AppSettings to:
cd /home/site/wwwroot; node ./node_modules/my-server/bin/my-test start
In need this because the node script assumes that the pwd is /home/site/wwwroot --
i.e. where the app is automatically deployed by Azure App Services.
I get the error below: How do I coerce the the pwd to be /home/site/wwwroot?
A P P S E R V I C E O N L I N U X
2018-11-09T09:56:40.100026333Z
2018-11-09T09:56:40.100029533Z Documentation: http://aka.ms/webapp-linux
2018-11-09T09:56:40.100032933Z NodeJS quickstart: https://aka.ms/node-qs
2018-11-09T09:56:40.100036233Z
2018-11-09T09:56:40.572970887Z Generating app startup command
2018-11-09T09:56:40.591498193Z Running cd /home/site/wwwroot ; node ./node_modules/my-server/bin/my-test start
2018-11-09T09:56:40.601297296Z /opt/startup/init_container.sh: line 28: exec: cd: not found
azure-web-sites kudu
add a comment |
up vote
0
down vote
favorite
I've deployed an app to Azure App Services Linux and setup the startup command in AppSettings to:
cd /home/site/wwwroot; node ./node_modules/my-server/bin/my-test start
In need this because the node script assumes that the pwd is /home/site/wwwroot --
i.e. where the app is automatically deployed by Azure App Services.
I get the error below: How do I coerce the the pwd to be /home/site/wwwroot?
A P P S E R V I C E O N L I N U X
2018-11-09T09:56:40.100026333Z
2018-11-09T09:56:40.100029533Z Documentation: http://aka.ms/webapp-linux
2018-11-09T09:56:40.100032933Z NodeJS quickstart: https://aka.ms/node-qs
2018-11-09T09:56:40.100036233Z
2018-11-09T09:56:40.572970887Z Generating app startup command
2018-11-09T09:56:40.591498193Z Running cd /home/site/wwwroot ; node ./node_modules/my-server/bin/my-test start
2018-11-09T09:56:40.601297296Z /opt/startup/init_container.sh: line 28: exec: cd: not found
azure-web-sites kudu
What error did you get if you directly usenode ./node_modules/my-server/bin/my-test start
? Startup command locates/home/site/wwwroot
as the root by default.
– Jerry Liu
Nov 12 at 10:22
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've deployed an app to Azure App Services Linux and setup the startup command in AppSettings to:
cd /home/site/wwwroot; node ./node_modules/my-server/bin/my-test start
In need this because the node script assumes that the pwd is /home/site/wwwroot --
i.e. where the app is automatically deployed by Azure App Services.
I get the error below: How do I coerce the the pwd to be /home/site/wwwroot?
A P P S E R V I C E O N L I N U X
2018-11-09T09:56:40.100026333Z
2018-11-09T09:56:40.100029533Z Documentation: http://aka.ms/webapp-linux
2018-11-09T09:56:40.100032933Z NodeJS quickstart: https://aka.ms/node-qs
2018-11-09T09:56:40.100036233Z
2018-11-09T09:56:40.572970887Z Generating app startup command
2018-11-09T09:56:40.591498193Z Running cd /home/site/wwwroot ; node ./node_modules/my-server/bin/my-test start
2018-11-09T09:56:40.601297296Z /opt/startup/init_container.sh: line 28: exec: cd: not found
azure-web-sites kudu
I've deployed an app to Azure App Services Linux and setup the startup command in AppSettings to:
cd /home/site/wwwroot; node ./node_modules/my-server/bin/my-test start
In need this because the node script assumes that the pwd is /home/site/wwwroot --
i.e. where the app is automatically deployed by Azure App Services.
I get the error below: How do I coerce the the pwd to be /home/site/wwwroot?
A P P S E R V I C E O N L I N U X
2018-11-09T09:56:40.100026333Z
2018-11-09T09:56:40.100029533Z Documentation: http://aka.ms/webapp-linux
2018-11-09T09:56:40.100032933Z NodeJS quickstart: https://aka.ms/node-qs
2018-11-09T09:56:40.100036233Z
2018-11-09T09:56:40.572970887Z Generating app startup command
2018-11-09T09:56:40.591498193Z Running cd /home/site/wwwroot ; node ./node_modules/my-server/bin/my-test start
2018-11-09T09:56:40.601297296Z /opt/startup/init_container.sh: line 28: exec: cd: not found
azure-web-sites kudu
azure-web-sites kudu
edited Nov 10 at 15:48
asked Nov 9 at 14:27
GGleGrand
8291029
8291029
What error did you get if you directly usenode ./node_modules/my-server/bin/my-test start
? Startup command locates/home/site/wwwroot
as the root by default.
– Jerry Liu
Nov 12 at 10:22
add a comment |
What error did you get if you directly usenode ./node_modules/my-server/bin/my-test start
? Startup command locates/home/site/wwwroot
as the root by default.
– Jerry Liu
Nov 12 at 10:22
What error did you get if you directly use
node ./node_modules/my-server/bin/my-test start
? Startup command locates /home/site/wwwroot
as the root by default.– Jerry Liu
Nov 12 at 10:22
What error did you get if you directly use
node ./node_modules/my-server/bin/my-test start
? Startup command locates /home/site/wwwroot
as the root by default.– Jerry Liu
Nov 12 at 10:22
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53227608%2fazure-app-services-linux-how-to-cd-to-a-the-wwwroot-directory-at-startup%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What error did you get if you directly use
node ./node_modules/my-server/bin/my-test start
? Startup command locates/home/site/wwwroot
as the root by default.– Jerry Liu
Nov 12 at 10:22