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
| [Unit] | |
| Description=Dummy Service in .NET | |
| # Requires=xyz.service | |
| # After=xyz.service | |
| [Service] | |
| Type=forking | |
| WorkingDirectory=/user/iqan | |
| ExecStart=dotnet DummyService/bin/debug/DummyService.dll |
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
| version: '3.4' | |
| services: | |
| dummyservice.app: | |
| image: iqan/dummyserviceapp | |
| build: | |
| context: . | |
| dockerfile: DummyService.App/Dockerfile | |
| environment: | |
| - EndpointConfiguration:ConnectionString=<your-servicebus-connectionstring> |
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 microsoft/dotnet:2.1-runtime-stretch-slim AS base | |
| WORKDIR /app | |
| FROM microsoft/dotnet:2.1-sdk-stretch AS build | |
| WORKDIR /src | |
| COPY ["DummyService.AcceptanceTests/DummyService.AcceptanceTests.csproj", "DummyService.AcceptanceTests/"] | |
| RUN dotnet restore "DummyService.AcceptanceTests/DummyService.AcceptanceTests.csproj" | |
| COPY . . | |
| WORKDIR "/src/DummyService.AcceptanceTests" | |
| RUN dotnet build "DummyService.AcceptanceTests.csproj" -c Release -o /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
| [Story( | |
| Title = "DummyEvent is handled", | |
| AsA = "As a dummy service", | |
| IWant = "I want to handle dummy event", | |
| SoThat = "So that I can get message data inserted in database")] | |
| public class DummyEventHandlingFeature | |
| { | |
| private IDictionary<string, string> _inMemoryStorage = new Dictionary<string, string>(); | |
| [Fact] |
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
| [Story( | |
| Title = "DummyEvent is handled", | |
| AsA = "As a dummy service", | |
| IWant = "I want to handle dummy event", | |
| SoThat = "So that I can get message data inserted in database")] | |
| public class DummyEventHandlingFeature | |
| { | |
| private IDictionary<string, string> _inMemoryStorage = new Dictionary<string, string>(); | |
| [Fact] |
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
| version: '3.4' | |
| services: | |
| dummyservice.app: | |
| image: iqan/dummyserviceapp | |
| build: | |
| context: . | |
| dockerfile: DummyService.App/Dockerfile | |
| environment: | |
| - EndpointConfiguration:ConnectionString=<your-servicebus-connectionstring> |
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
| USE master | |
| GO | |
| RESTORE DATABASE DummyDatabase | |
| FROM DISK = '/work/db.bak' WITH | |
| MOVE 'DummyDatabase' TO '/var/opt/mssql/data/DummyDatabase/DummyDatabase.mdf', | |
| MOVE 'DummyDatabase_log' TO '/var/opt/mssql/data/DummyDatabase/DummyDatabase_log.ldf' |
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
| echo "Setting Environment variables." | |
| export ACCEPT_EULA=Y | |
| export SA_PASSWORD=SuperSecretPassword#1 | |
| echo "Environment variables set." | |
| echo "Starting SqlServr" | |
| /opt/mssql/bin/sqlservr & | |
| sleep 60 | echo "Waiting for 60s to start Sql Server" | |
| echo "Restoring DB." | |
| /opt/mssql-tools/bin/sqlcmd -U sa -P SuperSecretPassword#1 -i $1 | |
| echo "DB restored." |
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 microsoft/mssql-server-linux | |
| RUN mkdir /work | |
| COPY CreateDb.sql /work | |
| COPY db.sh /work | |
| COPY db.bak /work | |
| WORKDIR /work |
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 microsoft/dotnet:2.2-runtime-stretch-slim AS base | |
| WORKDIR /app | |
| FROM microsoft/dotnet:2.2-sdk-stretch AS build | |
| WORKDIR /src | |
| COPY ["DummyService.App/DummyService.App.csproj", "DummyService.App/"] | |
| RUN dotnet restore "DummyService.App/DummyService.App.csproj" | |
| COPY . . | |
| WORKDIR "/src/DummyService.App" | |
| RUN dotnet build "DummyService.App.csproj" -c Release -o /app |