This repo was created to clear how to deploy a single docker container runing a basic Node.js application with Typescript using azure/webapps-deploy@v2
Another common situations why your app is not running:
-
don't use
EXPOSE
flag onDockerfile
(apparently Azure use it internally) -
SET WEBSITES_CONTAINER_START_TIME_LIMIT, increase it to max timeout
-
USE PERSONAL ACCESS TOKEN INSTEAD GITHUB_TOKEN cause github tokens expires.
Following this steps you will be able to deploy your app with a Single dockerfile
Test live example deployed with this code
This works if you came from GithubLab, GitHub Actions: Continuous Delivery with Azure 'cause the starter example with static files didn't work for me,you can make work it with this configuration too.
Project structure created with npx
npx create-express-typescript-application express-ts-app
Project structure:
─╯
.
├── build
│ ├── src
│ │ ├── app
│ │ │ ├── sample
│ │ │ └── server-status
│ │ ├── constants
│ │ │ └── endpoint.js
│ │ ├── utils
│ │ │ └── getFilesWithKeyword.js
│ │ ├── index.js
│ │ └── server.js
│ └── config.json
├── src
│ ├── app
│ │ ├── sample
│ │ │ └── sample.router.ts
│ │ └── server-status
│ │ ├── server-status.router.ts
│ │ └── server.status.service.ts
│ ├── constants
│ │ └── endpoint.ts
│ ├── utils
│ │ └── getFilesWithKeyword.ts
│ ├── index.ts
│ └── server.ts
├── Dockerfile
├── README.md
├── config.json
├── package-lock.json
├── package.json
└── tsconfig.json