azuredeploy.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. {
  2. "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  3. "contentVersion": "1.0.0.0",
  4. "parameters": {
  5. "siteName": {
  6. "type": "string"
  7. },
  8. "hostingPlanName": {
  9. "type": "string"
  10. },
  11. "siteLocation": {
  12. "type": "string",
  13. "defaultValue": "West US"
  14. },
  15. "sku": {
  16. "type": "string",
  17. "allowedValues": [
  18. "F1",
  19. "D1",
  20. "B1",
  21. "S1"
  22. ],
  23. "defaultValue": "F1"
  24. },
  25. "workerSize": {
  26. "type": "string",
  27. "allowedValues": [
  28. "0",
  29. "1",
  30. "2"
  31. ],
  32. "defaultValue": "0"
  33. },
  34. "repoURL": {
  35. "type": "string",
  36. "defaultValue": "https://github.com/outsideris/slack-invite-automation.git"
  37. },
  38. "branch": {
  39. "type": "string",
  40. "defaultValue": "master"
  41. },
  42. "communityName": {
  43. "type": "string"
  44. },
  45. "slackUrl": {
  46. "type": "string"
  47. },
  48. "slackToken": {
  49. "type": "string"
  50. },
  51. "inviteToken": {
  52. "type": "string"
  53. },
  54. "recaptchaSite": {
  55. "type": "string",
  56. "defaultValue": ""
  57. },
  58. "recaptchaSecret": {
  59. "type": "string",
  60. "defaultValue": ""
  61. },
  62. "locale": {
  63. "type": "string",
  64. "defaultValue": "en",
  65. "allowedValues": [
  66. "cs",
  67. "de",
  68. "en",
  69. "es",
  70. "fr",
  71. "it",
  72. "ja",
  73. "ko",
  74. "nl",
  75. "pl",
  76. "pt",
  77. "pt-BR",
  78. "tr",
  79. "zh-CN",
  80. "zh-TW"
  81. ]
  82. },
  83. "subpath": {
  84. "type": "string",
  85. "defaultValue": "/"
  86. }
  87. },
  88. "variables": {},
  89. "resources": [
  90. {
  91. "apiVersion": "2015-08-01",
  92. "name": "[parameters('hostingPlanName')]",
  93. "type": "Microsoft.Web/serverfarms",
  94. "location": "[parameters('siteLocation')]",
  95. "properties": {
  96. "name": "[parameters('hostingPlanName')]"
  97. },
  98. "sku": {
  99. "name": "[parameters('sku')]"
  100. }
  101. },
  102. {
  103. "apiVersion": "2015-08-01",
  104. "name": "[parameters('siteName')]",
  105. "type": "Microsoft.Web/sites",
  106. "location": "[parameters('siteLocation')]",
  107. "tags": {
  108. "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
  109. },
  110. "dependsOn": [
  111. "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
  112. ],
  113. "properties": {
  114. "name": "[parameters('siteName')]",
  115. "serverFarmId": "[parameters('hostingPlanName')]"
  116. },
  117. "resources": [
  118. {
  119. "apiVersion": "2015-08-01",
  120. "name": "web",
  121. "type": "config",
  122. "dependsOn": [
  123. "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
  124. ],
  125. "properties": {}
  126. },
  127. {
  128. "apiVersion": "2015-08-01",
  129. "name": "appsettings",
  130. "type": "config",
  131. "dependsOn": [
  132. "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
  133. ],
  134. "properties": {
  135. "COMMUNITY_NAME": "[parameters('communityName')]",
  136. "SLACK_URL": "[parameters('slackUrl')]",
  137. "SLACK_TOKEN": "[parameters('slackToken')]",
  138. "INVITE_TOKEN": "[parameters('inviteToken')]",
  139. "RECAPTCHA_SITE": "[parameters('recaptchaSite')]",
  140. "RECAPTCHA_SECRET": "[parameters('recaptchaSecret')]",
  141. "LOCALE": "[parameters('locale')]",
  142. "SUBPATH": "[parameters('subpath')]",
  143. "WEBSITE_NODE_DEFAULT_VERSION": "8.9.4"
  144. }
  145. },
  146. {
  147. "apiVersion": "2015-08-01",
  148. "name": "web",
  149. "type": "sourcecontrols",
  150. "dependsOn": [
  151. "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]",
  152. "[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/web')]"
  153. ],
  154. "properties": {
  155. "RepoUrl": "[parameters('repoURL')]",
  156. "branch": "[parameters('branch')]",
  157. "IsManualIntegration": true
  158. }
  159. }
  160. ]
  161. }
  162. ],
  163. "outputs": {
  164. "siteUri": {
  165. "type": "string",
  166. "value": "[concat('https://',reference(resourceId('Microsoft.Web/sites', parameters('siteName'))).hostNames[0])]"
  167. }
  168. }
  169. }