Skip to content

Commit

Permalink
added setup, reorganized
Browse files Browse the repository at this point in the history
  • Loading branch information
bradygaster committed Jun 7, 2020
1 parent ad16904 commit fe0197d
Show file tree
Hide file tree
Showing 30 changed files with 34 additions and 92 deletions.
7 changes: 3 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/bin/Debug/netcoreapp3.1/COVIDScreeningApi.dll",
"program": "${workspaceFolder}/src/COVIDScreeningApi/bin/Debug/netcoreapp3.1/COVIDScreeningApi.dll",
"args": [],
"cwd": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi",
"cwd": "${workspaceFolder}/src/COVIDScreeningApi",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)",
"uriFormat": "%s/swagger"
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand Down
62 changes: 3 additions & 59 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj",
"${workspaceFolder}/src/COVIDScreeningApi/COVIDScreeningApi.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj",
"${workspaceFolder}/src/COVIDScreeningApi/COVIDScreeningApi.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -32,67 +32,11 @@
"args": [
"watch",
"run",
"${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj",
"${workspaceFolder}/src/COVIDScreeningApi/COVIDScreeningApi.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"type": "docker-build",
"label": "docker-build: debug",
"dependsOn": [
"build"
],
"dockerBuild": {
"tag": "covidscreeningapi:dev",
"target": "base",
"dockerfile": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
},
"netCore": {
"appProject": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj"
}
},
{
"type": "docker-build",
"label": "docker-build: release",
"dependsOn": [
"build"
],
"dockerBuild": {
"tag": "covidscreeningapi:latest",
"dockerfile": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
},
"netCore": {
"appProject": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj"
}
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": [
"docker-build: debug"
],
"dockerRun": {},
"netCore": {
"appProject": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj",
"enableDebugging": true
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": [
"docker-build: release"
],
"dockerRun": {},
"netCore": {
"appProject": "${workspaceFolder}/Start/COVIDScreeningApi/COVIDScreeningApi/COVIDScreeningApi.csproj"
}
}
]
}
26 changes: 0 additions & 26 deletions Start/COVIDScreeningApi/.dockerignore

This file was deleted.

27 changes: 27 additions & 0 deletions create-resources.azcli
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# the name of the resource group
resource-group="covid-screening-app-resources"

# the name of the api management resource
apim-name="screening-apis"

# the name of the cosmos db resource
cosmos-db-name="screeningcosmosdb"

# the region in which we want things to be created
region="westus"

# create the resource group
az group create --name $resource-group --location $region

# create the cosmos db resource
az cosmosdb create --name $cosmos-db-name --resource-group $resource-group

# create the cosmos db in the cosmos db resource
az cosmosdb database create --name $cosmos-db-name --resource-group $resource-group --db-name "COVIDScreeningDb"

# create the 3 collections in the cosmos db resource we'll need

# get the connection string of the cosmos db resource

# create the apim resource
az apim create --name $apim-name
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
cls

# Variables
Set-Variable -Name ResourceGroupName "COVIDScreeningAPI"
Set-Variable -Name ApimInstance "screening-app-apis"
Set-Variable -Name SwaggerFilePath "C:\Users\brady\source\repos\bradygaster\COVIDScreeningApi\Start\COVIDScreeningApi\COVIDScreeningApi\bin\Debug\netcoreapp3.1\swagger.json"
Set-Variable -Name SwaggerFilePath "./src/COVIDScreeningApi/bin/Debug/netcoreapp3.1/swagger.json"
Set-Variable -Name ServiceUrl "https://covid-screening-api.azurewebsites.net"
Set-Variable -Name ApiId "COVIDScreeningApi"
Set-Variable -Name ApiVersion "v1"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fe0197d

Please sign in to comment.