angular - How to deploy an Angular2 + Webpack app on Azure? -
i'm trying find information online how deploy angular2 webpack app azure, couldn't find helpful enough. checked start package suggested here how deploy angular 2 apps? couldn't find there.
so, have angular2 app running webpack locally. it's working locally. how deploy azure web apps?
i appreciate :)
thanks!
well, able working. after researching found out there few options go by, creating own local prod build , uploading , using cd/ci. went latter. took quite time, it's set don't have worry anymore...
i based myself in tutorial http://tattoocoder.com/angular2-azure-codeship-angularcli/ shane boyer since link-only answers discouraged i'm going write here.
here's how did it:
- create branch release on github (i use 1 publish)
on
configure project
selecti want create custom commands
, use code:
nvm install 4.1
npm install angular-cli
npm install
ng serve &
ng e2e
ng build -prod
- click
save , go dashboard
- now go azure portal (https://portal.azure.com/) , open/create web app
- click on
deployment options > choose source > local git repository
- then click on
deployment credentials
, insert user/password prefer - click on
overview
, copygit clone url
- go
project settings > environment variables
, addazure_repo_url
value being git clone url copied user/password (https://username:password@site.scm.az(...).git
): - after, click on
deployment
on left navigation menu - choose branch want deploy (in case release) , click save, click on
custom script
- then customize , add script:
git config --global user.email "email@provider.com" git config --global user.name "your name" git clone $azure_repo_url repofolder cd repofolder rm -rf * cp -rf ~/clone/dist/* . git add -a git commit --all --author "$ci_committer_name <$ci_committer_email>" --message "$ci_message ($ci_build_url)" git push origin master
that it. every time push github codeship build code , every time pr release build , publish azure.
thank https://stackoverflow.com/users/595213/shayne-boyer this.
Comments
Post a Comment