remove secrets from source code

master
Tudor Stanciu 2022-11-22 23:25:52 +02:00
parent 1a601c7f73
commit 60b8c75c96
14 changed files with 22 additions and 98 deletions

View File

@ -2,7 +2,7 @@
echo "Welcome!"
version="1.0.5"
localRegistryPass="***REMOVED***"
localRegistryPass="*********"
echo "Create docker image with version $version."
docker image build --build-arg APP_VERSION=$version -t "network-resurrector-api:$version" -f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" .

View File

@ -2,8 +2,8 @@
echo "Welcome!"
version="1.0.1"
localRegistryPass="***REMOVED***"
dockerHubRegistryPass="***REMOVED***"
localRegistryPass="*********"
dockerHubRegistryPass="*********"
echo "Login to dockerhub registry."
docker login --username=tstanciu --password=$dockerHubRegistryPass

View File

@ -5,7 +5,7 @@ echo "Welcome!"
#platform="linux/amd64,linux/arm64"
version="1.0.6-arm64"
platform="linux/arm64"
localRegistryPass="***REMOVED***"
localRegistryPass="*********"
echo "Login to alpine-nexus registry."
docker login --username=admin --password=$localRegistryPass alpine-nexus:8500

View File

@ -10,37 +10,7 @@ Resources: https://github.com/nikeee/wake-on-lan
Multiple Directory.Build.props:
https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019
#######################################################################################################################################################
Azure DevOps Repository Password: ***REMOVED***
#######################################################################################################################################################
ORION
***REMOVED***
***REMOVED***
fileSrv
***REMOVED***
***REMOVED***
esxiSrv
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
thin-ovm
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
#######################################################################################################################################################
- masinile sunt afisate in ordinea numarului de porniri
Agent:

View File

@ -4,10 +4,10 @@ Push nuget packages:
dotnet pack /*--include-symbols*/
# Server:
dotnet nuget push NetworkResurrector.Server.PublishedLanguage.1.0.3.nupkg -k ***REMOVED*** -s https://toodle.ddns.net/public-nuget-server/nuget
dotnet nuget push NetworkResurrector.Server.Wrapper.1.0.3.3.nupkg -k ***REMOVED*** -s https://toodle.ddns.net/public-nuget-server/nuget
dotnet nuget push NetworkResurrector.Server.PublishedLanguage.1.0.3.nupkg -k ****KEY**** -s https://toodle.ddns.net/public-nuget-server/nuget
dotnet nuget push NetworkResurrector.Server.Wrapper.1.0.3.3.nupkg -k ****KEY**** -s https://toodle.ddns.net/public-nuget-server/nuget
# Agent
dotnet nuget push NetworkResurrector.Agent.PublishedLanguage.1.0.3.nupkg -k ***REMOVED*** -s https://toodle.ddns.net/public-nuget-server/nuget
dotnet nuget push NetworkResurrector.Agent.Wrapper.1.0.3.1.nupkg -k ***REMOVED*** -s https://toodle.ddns.net/public-nuget-server/nuget
dotnet nuget push NetworkResurrector.Agent.PublishedLanguage.1.0.3.nupkg -k ****KEY**** -s https://toodle.ddns.net/public-nuget-server/nuget
dotnet nuget push NetworkResurrector.Agent.Wrapper.1.0.3.1.nupkg -k ****KEY**** -s https://toodle.ddns.net/public-nuget-server/nuget
#######################################################################################################################################################

View File

@ -1,8 +1,7 @@
{
"Urls": "http://*:5068",
"ConnectionStrings": {
//"DatabaseConnection": "***REMOVED***"
"DatabaseConnection": "***REMOVED***"
"DatabaseConnection": "Server=#########;Database=#########;User Id=#########;Password=#########;MultipleActiveResultSets=true"
},
"Logging": {
"LogLevel": {

View File

@ -1,42 +0,0 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY dependencies.props .
COPY Directory.Build.props .
COPY NuGet.config .
COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "NetworkResurrector.Api/"]
COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "NetworkResurrector.Api.Application/"]
COPY ["src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj", "NetworkResurrector.Api.PublishedLanguage/"]
COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "NetworkResurrector.Api.Domain/"]
COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "NetworkResurrector.Api.Domain.Data/"]
RUN dotnet restore "NetworkResurrector.Api/NetworkResurrector.Api.csproj"
COPY src/api .
WORKDIR "/src/NetworkResurrector.Api"
RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "NetworkResurrector.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENV urls="http://*:80"
ENV ConnectionStrings__DatabaseConnection="***REMOVED***"
ENV IdentityServer__BaseAddress="***REMOVED***"
ENV NetworkResurrectorServer__BaseAddress="***REMOVED***"
ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ARG APP_VERSION=0.0.0.0
ENV APP_VERSION=${APP_VERSION}
#Workaround to lower the TLS level in container for old sql server version
RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf
ENTRYPOINT ["dotnet", "NetworkResurrector.Api.dll", "--console"]

View File

@ -27,9 +27,9 @@ WORKDIR /app
COPY --from=publish /app/publish .
ENV urls="http://*:80"
ENV ConnectionStrings__DatabaseConnection="***REMOVED***"
ENV IdentityServer__BaseAddress="***REMOVED***"
ENV NetworkResurrectorServer__BaseAddress="***REMOVED***"
ENV ConnectionStrings__DatabaseConnection="*********"
ENV IdentityServer__BaseAddress="*********"
ENV NetworkResurrectorServer__BaseAddress="*********"
ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@ -27,9 +27,9 @@ WORKDIR /app
COPY --from=publish /app/publish .
ENV urls="http://*:80"
ENV ConnectionStrings__DatabaseConnection="***REMOVED***"
ENV IdentityServer__BaseAddress="***REMOVED***"
ENV NetworkResurrectorServer__BaseAddress="***REMOVED***"
ENV ConnectionStrings__DatabaseConnection="*********"
ENV IdentityServer__BaseAddress="*********"
ENV NetworkResurrectorServer__BaseAddress="*********"
ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@ -27,9 +27,9 @@ WORKDIR /app
COPY --from=publish /app/publish .
ENV urls="http://*:80"
ENV ConnectionStrings__DatabaseConnection="***REMOVED***"
ENV IdentityServer__BaseAddress="***REMOVED***"
ENV NetworkResurrectorServer__BaseAddress="***REMOVED***"
ENV ConnectionStrings__DatabaseConnection="*********"
ENV IdentityServer__BaseAddress="*********"
ENV NetworkResurrectorServer__BaseAddress="*********"
ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@ -13,7 +13,7 @@ Push image to registry:
docker tag network-resurrector-api:1.0.1 alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.1
--login to registry
docker login --username=admin --password="***REMOVED***" alpine-nexus:8500
docker login --username=admin --password="*********" alpine-nexus:8500
--push image
docker push alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.1

View File

@ -3,7 +3,7 @@
Create image and push it:
--login to registry
docker login --username=tstanciu --password="***REMOVED***"
docker login --username=tstanciu --password="*********"
--from solution folder:
docker buildx build --platform linux/arm/v7 -t "tstanciu/sta-registry:network-resurrector-api-1.0.1-arm32v7" -f "src/api/NetworkResurrector.Api/Docker/arm32/Dockerfile" --push .

View File

@ -1,9 +1,7 @@
{
"urls": "http://*:5064",
"ConnectionStrings": {
"DatabaseConnection": "***REMOVED***"
//"DatabaseConnection": "***REMOVED***"
//"DatabaseConnection": "***REMOVED***"
"DatabaseConnection": "Server=#########;Database=#########;User Id=#########;Password=#########;MultipleActiveResultSets=true"
},
"Logging": {
"LogLevel": {

View File

@ -1,8 +1,7 @@
{
"urls": "http://*:5062",
"ConnectionStrings": {
//"DatabaseConnection": "***REMOVED***"
"DatabaseConnection": "***REMOVED***"
"DatabaseConnection": "Server=#########;Database=#########;User Id=#########;Password=#########;MultipleActiveResultSets=true"
},
"Logging": {
"LogLevel": {