Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,28 @@ This is a small web application that demonstrates the basic functionality of the
## Prerequisites
* [A channel on the LINE Developers Console](https://developers.line.me/en/docs/liff/getting-started/) for your application.
* [A channel access token](https://developers.line.me/en/docs/liff/getting-started/#preparing-channel-access-token)
* A [Heroku account](https://www.heroku.com)
* A [Heroku account](https://www.heroku.com) or [Azure account](https://azure.microsoft.com)

## Deploying the application

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/line/line-liff-starter)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/line/line-liff-starter)

1. Click the above "Deploy to Heroku button".
2. Fill in the required information on the "Create a New App" page in Heroku.
3. Select Deploy app and confirm that your app is successfully deployed.
4. Record the app URL (https://{Heroku app name}.herokuapp.com). You will set this URL when you add the app to LIFF.

[![Deploy to Azure](https://azuredeploy.net/deploybutton.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fhoisjp%2Fline-liff-starter%2Fmaster%2Fazuredeploy.json)

1. Click the above "Deploy to Azure" button.
2. Fill in the required information on the "Custom deployment" page in Azure portal.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hoisjp Thank you for submitting your pull request. When I hit the Deploy to Azure button, it redirects me to the Azure portal page. I'm not able to find Custom Deployment which is mentioned in the Deploying the application in the portal. Is this expected?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smwilk thank you for your review.
I tried again in an Incognito mode. I see "Custom Deployment" screen after hitting the button (and Azure account login) as expected like below.
image

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for sharing the screenshot. I'm currently seeking help from the Microsoft customer support team. I will keep you posted on the progress. Thank you for your patience.

3. BASIC
* Resource group: Select or Create new
* Location: Select one which is close to your location. e.g. (Asia Pacific) Japan East
4. SETTINGS
* Web Site Name: Set your site name which will determine the URL (https://{websitename}.azurewebsites.net). You will set this URL when you add the app to LIFF.
5. Click the "Purchase" button and confirm that your app is successfully deployed. (It won't cost any as long as you keep Sku App Svc Plan = F1 by default)

## Adding the starter app to LIFF

Add the app to LIFF. For more information, see [Adding a LIFF app](https://developers.line.me/en/docs/liff/registering-liff-apps/).
Expand Down
122 changes: 122 additions & 0 deletions azuredeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webSiteName": {
"type": "string",
"metadata": {
"description": "Web site name to define ***.azurewebsites.net . (need to be unique)"
}
},
"skuAppSvcPlan": {
"type": "string",
"allowedValues": [
"F1",
"D1",
"B1",
"S1"
],
"defaultValue": "F1",
"metadata": {
"description": "The SKU of App Service Plan, Free F1 by default."
}
},
"repoUrl": {
"type": "string",
"defaultValue": "https://github.com/hoisjp/line-liff-starter"
},
"branch": {
"type": "string",
"defaultValue": "master"
}
},
"variables": {
"appSvcPlanName": "[concat('appSvcPlan-', parameters('webSiteName'))]"
},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2018-02-01",
"kind": "app",
"name": "[variables('appSvcPlanName')]",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('skuAppSvcPlan')]"
},
"properties": {
"name": "[variables('appSvcPlanName')]"
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2018-11-01",
"name": "[parameters('webSiteName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appSvcPlanName'))]"
],
"kind": "app",
"properties": {
"enabled": true,
"hostNameSslStates": [
{
"name": "[concat(parameters('webSiteName'), '.azurewebsites.net')]",
"sslState": "Disabled",
"hostType": "Standard"
},
{
"name": "[concat(parameters('webSiteName'), '.scm.azurewebsites.net')]",
"sslState": "Disabled",
"hostType": "Repository"
}
],
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appSvcPlanName'))]",
"reserved": false,
"scmSiteAlsoStopped": false,
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"hostNamesDisabled": false,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"httpsOnly": false
},
"resources": [
{
"type": "sourcecontrols",
"apiVersion": "2018-11-01",
"name": "web",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('webSiteName'))]",
"[concat('Microsoft.Web/Sites/', parameters('webSiteName'), '/config/web')]"
],
"properties": {
"repoUrl" : "[parameters('repoUrl')]",
"branch": "[parameters('branch')]"
}
}
]
},
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2018-11-01",
"name": "[concat(parameters('webSiteName'), '/web')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('webSiteName'))]"
],
"properties": {
"numberOfWorkers": 1,
"defaultDocuments": [
"index.html",
"index.php"
],
"phpVersion": "7.3",
"localMySqlEnabled": false,
"http20Enabled": false,
"minTlsVersion": "1.2",
"ftpsState": "Disabled",
"reservedInstanceCount": 0
}
}
]
}