Skip to content
Merged
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
26 changes: 26 additions & 0 deletions docs/AppSettings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## アプリケーション設定

### Web.config
Web.config には、 次のようなアプリケーション設定があります。

```xml
<configuration>
<appSettings>
<add key="app:RequireHttps" value="true" />
<add key="app:PermanentHttps" value="false" />
</appSettings>
</configuration>
```

それぞれの説明は次の通りです。
- `app:RequireHttps`
- HTTPS を必須とする場合は `true` を指定します。
- HTTP でアクセスすると、HTTPS の URL にリダイレクトされます。
- `app:PermanentHttps`
- リダイレクト時に HTTPS を永続化する場合は `true` を指定します。
- すなわち、HTTP ステータス コードは `true` のとき 301、`false` のとき 302 です。

### Azure Web App
Azure Web App では、[アプリケーション設定] で値を設定します。

![](images/AppSettings-Azure.png)
18 changes: 15 additions & 3 deletions docs/Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@
GitHub にサインインして、このリポジトリを fork します。
(Azure Web App と連携させるには、自身で所有しているリポジトリでなければならないためです。)

![](images/Deployment-1.jpg)

次に、Azure で Web App を作成します。

作成が完了したら、[デプロイ オプション] を構成します。
![](images/Deployment-2.jpg)

Web App の作成が完了したら、[デプロイ オプション] を構成します。
ソースとして GitHub を選択すると、アカウント承認の画面が現れます。さらにリポジトリとブランチを選択します。

必要な設定はこれだけです。設定完了と同時に、ビルドおよびデプロイが開始されます。
![](images/Deployment-3.jpg)

必要な設定はこれだけです。設定完了と同時に、ビルドおよびデプロイが開始されます。
デプロイが完了すれば Web API が利用可能となります。

![](images/Deployment-4.png)

継続的デプロイが構成されるため、これ以降も fork したリポジトリを更新すれば、自動的にビルドおよびデプロイが実行されます。

これ以降も、fork したリポジトリを更新すれば、自動的にビルドおよびデプロイが実行されます。
### アプリケーション設定
- [アプリケーション設定](AppSettings.md)

### 参照
- [Azure と GitHub で継続的デプロイ (2017)](https://sakapon.wordpress.com/2017/12/30/azure-github-2017/)
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PaaS を利用して、この Web API を簡単にホストすることができ

- [ホスティングについて](Hosting.md)
- [Azure Web App にデプロイする手順](Deployment.md)
- [アプリケーション設定](AppSettings.md)

## ランダム データの種類
- アルファベット
Expand All @@ -23,3 +24,8 @@ PaaS を利用して、この Web API を簡単にホストすることができ
- jQuery を利用したテストページ

[randomdata.azurewebsites.net](https://randomdata.azurewebsites.net/) は配置例です。

## ヘルプページの多言語対応
ブラウザーの翻訳機能で何とかなるでしょう。

![](images/Help-Translation.gif)
Binary file added docs/images/AppSettings-Azure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Deployment-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Deployment-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Deployment-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Deployment-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Help-Translation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.