Skip to content

Commit

Permalink
working dropdowns for locations, user authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
Yumulak committed Oct 30, 2023
1 parent 59300f8 commit 93fdb29
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/Weatherly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and deploy .NET Core application to Web App Weatherly
on:
push:
branches:
- main
env:
AZURE_WEBAPP_NAME: Weatherly
AZURE_WEBAPP_PACKAGE_PATH: .\published
CONFIGURATION: Release
DOTNET_CORE_VERSION: 7.0.x
WORKING_DIRECTORY: .
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: Test
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
- name: Publish Artifacts
uses: actions/upload-artifact@v3
with:
name: webapp
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
deploy:
runs-on: windows-latest
needs: build
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: webapp
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.Weatherly_F47F }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
81 changes: 81 additions & 0 deletions Properties/ServiceDependencies/Weatherly/mssql1.arm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceGroupName": {
"type": "string",
"defaultValue": "WeatherlyRG",
"metadata": {
"_parameterType": "resourceGroup",
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
}
},
"resourceGroupLocation": {
"type": "string",
"defaultValue": "eastus",
"metadata": {
"_parameterType": "location",
"description": "Location of the resource group. Resource groups could have different location than resources."
}
},
"resourceLocation": {
"type": "string",
"defaultValue": "[parameters('resourceGroupLocation')]",
"metadata": {
"_parameterType": "location",
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
}
}
},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"name": "[parameters('resourceGroupName')]",
"location": "[parameters('resourceGroupLocation')]",
"apiVersion": "2019-10-01"
},
{
"type": "Microsoft.Resources/deployments",
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('Weatherly_db', subscription().subscriptionId)))]",
"resourceGroup": "[parameters('resourceGroupName')]",
"apiVersion": "2019-10-01",
"dependsOn": [
"[parameters('resourceGroupName')]"
],
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"kind": "v12.0",
"location": "[parameters('resourceLocation')]",
"name": "weatherlydbserver",
"type": "Microsoft.Sql/servers",
"apiVersion": "2017-10-01-preview"
},
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"location": "[parameters('resourceLocation')]",
"name": "weatherlydbserver/Weatherly_db",
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2017-10-01-preview",
"dependsOn": [
"weatherlydbserver"
]
}
]
}
}
}
],
"metadata": {
"_dependencyType": "mssql.azure"
}
}
12 changes: 12 additions & 0 deletions Properties/serviceDependencies.Weatherly.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"dependencies": {
"mssql1": {
"serviceConnectorResourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Web/sites/Weatherly/providers/Microsoft.ServiceLinker/linkers/ConnectionStringsDefaultConnection_FCB2E0B773",
"secretStore": "AzureAppSettings",
"resourceId": "/subscriptions/[parameters('subscriptionId')]/resourcegroups/[parameters('resourceGroupName')]/providers/Microsoft.Sql/servers/weatherlydbserver/databases/Weatherly_db",
"type": "mssql.azure",
"connectionId": "ConnectionStrings:DefaultConnection",
"dynamicId": null
}
}
}
3 changes: 2 additions & 1 deletion Properties/serviceDependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"dependencies": {
"mssql1": {
"type": "mssql",
"connectionId": "ConnectionStrings:DefaultConnection"
"connectionId": "ConnectionStrings:DefaultConnection",
"dynamicId": null
}
}
}
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ASP.NET MVC Weather App

A web app made with ASP.NET that uses the OpenWeatherMap API to get current weather information.
## Video
https://github.com/Yumulak/ASP.NET-MVC-Weather-App/assets/92001031/ecfd4c12-f660-4979-80fc-b4160b47911c

## Plans
### Search location by city and state
- use Geocoding API to translate to coordinates :heavy_check_mark:
### Database to persist user data
- User saved locations
### Authentication for users upon opening site
### Host website using Azure
- Host on Azure App Service :heavy_check_mark:

0 comments on commit 93fdb29

Please sign in to comment.