-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
174 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// ============================================================================ | ||
// A module to deploy a Blob container to an existing Storage Account | ||
// ============================================================================ | ||
|
||
@description('Name of existing Storage Account') | ||
param storageAccountName string | ||
|
||
@description('Name of table to create') | ||
param name string | ||
|
||
@description('Public access level for container') | ||
@allowed([ | ||
'None' | ||
'Blob' | ||
'Container' | ||
]) | ||
param publicAccess string = 'None' | ||
|
||
// ===== Modules & Resources ================================================== | ||
|
||
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' existing = { | ||
name: storageAccountName | ||
} | ||
|
||
resource blobService 'Microsoft.Storage/storageAccounts/blobServices@2021-04-01' = { | ||
name: 'default' | ||
parent: storageAccount | ||
} | ||
|
||
resource container 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-04-01' = { | ||
parent: blobService | ||
name: name | ||
|
||
properties: { | ||
publicAccess: publicAccess | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// ============================================================================ | ||
// A module to deploy a Storage Account Table to an existing Storage Account | ||
// ============================================================================ | ||
|
||
@description('Name of existing Storage Account') | ||
param storageAccountName string | ||
|
||
@description('Name of table to create') | ||
param name string | ||
|
||
// ===== Modules & Resources ================================================== | ||
|
||
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' existing = { | ||
name: storageAccountName | ||
} | ||
|
||
resource tableService 'Microsoft.Storage/storageAccounts/tableServices@2023-01-01' = { | ||
name: 'default' | ||
parent: storageAccount | ||
} | ||
|
||
resource table 'Microsoft.Storage/storageAccounts/tableServices/tables@2023-01-01' = { | ||
parent: tableService | ||
name: name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server { | ||
listen 9000; | ||
|
||
location /v1.0 { | ||
proxy_pass http://localhost:3501; | ||
} | ||
|
||
location / { | ||
proxy_pass http://localhost:8000; | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# This script starts the local version of the API gateway | ||
# Wraps nginx-proxy.sh in `dapr run` so that nginx runs Dapr-ized | ||
# | ||
# ========================================================================= | ||
# Starts the local version of the API gateway using Docker and NGINX | ||
# ========================================================================= | ||
|
||
docker rm -f api-gateway || true | ||
|
||
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | ||
dapr run --app-id api-gateway --app-port 9000 --log-level warn "$scriptDir"/nginx-proxy.sh --resources-path "$scriptDir"/../../components | ||
|
||
dapr run --app-id api-gateway \ | ||
--app-port 9000 \ | ||
--log-level warn \ | ||
--dapr-http-port 3501 \ | ||
--resources-path "$scriptDir/../../components" \ | ||
-- docker run --rm --network host --mount type=bind,source="$scriptDir",target=/etc/nginx/conf.d/ --name api-gateway nginx:alpine |