This file contains hidden or 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
| name: Build Windows Container Image | |
| on: | |
| push: | |
| branches: [ post-containerisation ] | |
| pull_request: | |
| branches: [ post-containerisation ] | |
| workflow_dispatch: | |
| env: |
This file contains hidden or 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
| FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build | |
| WORKDIR /app | |
| # copy csproj and restore as distinct layers | |
| COPY MvcMusicStore-Completed/*.sln . | |
| COPY MvcMusicStore-Completed/MvcMusicStore/*.csproj ./MvcMusicStore/ | |
| COPY MvcMusicStore-Completed/MvcMusicStore/*.config ./MvcMusicStore/ | |
| RUN nuget restore | |
| # copy everything else and build app |
This file contains hidden or 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
| #Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed. | |
| #For more information, please see https://aka.ms/containercompat | |
| FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 | |
| ARG source | |
| WORKDIR /inetpub/wwwroot | |
| COPY ${source:-obj/Docker/publish} . |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: Secret | |
| metadata: | |
| name: dbconnection | |
| type: Opaque | |
| data: | |
| connstring: U2Vy_NOT_A_VALID_BASE_64_sdoinsdcoin= |
This file contains hidden or 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
| <sessionState mode="Custom" customProvider="DefaultSessionProvider"> | |
| <providers> | |
| <add name="DefaultSessionProvider" | |
| type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" | |
| connectionStringName="MusicStoreEntities" /> | |
| </providers> | |
| </sessionState> |
This file contains hidden or 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
| <connectionStrings configBuilders="Environment"> | |
| <add name="MusicStoreEntities" | |
| connectionString="ignored" | |
| providerName="System.Data.SqlClient" /> | |
| </connectionStrings> |
This file contains hidden or 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
| <connectionStrings> | |
| <add name="MusicStoreEntities" | |
| connectionString="Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;" | |
| providerName="System.Data.SqlClient" /> | |
| </connectionStrings> |
This file contains hidden or 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
| az group create --name {resgroup} --location {location} | |
| az sql server create --admin-password {youradminpwd} --admin-user {youradminuser} --name {servername} --resource-group {resgroup} --location {location} | |
| az sql db create --resource-group {resgroup} -server {servername} --name {dbname} --edition GeneralPurpose --family Gen5 --capacity 2 --compute-model Serverless | |
| az sql db show-connection-string --server {servername} --name {dbname} -c ado.net |
This file contains hidden or 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
| # Note that version numbers are applicable for .NET Framwork 4.7.2 and may differ from what your app requires | |
| Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1 | |
| Install-Package Microsoft.Configuration.ConfigurationBuilders.Environment -Version 2.0.0 | |
| Install-Package Microsoft.AspNet.Providers |
This file contains hidden or 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
| from io import BytesIO | |
| from logging import FileHandler | |
| import logging | |
| import azure.functions as func | |
| from PIL import Image | |
| def main(msg: func.QueueMessage, inputblob: func.InputStream, | |
| outputblob: func.Out[func.InputStream]) -> None: | |
| blob_source_raw_name = msg.get_body().decode('utf-8') |