Remove secrets from source code
parent
e364ee25f4
commit
0840d28950
|
@ -27,7 +27,7 @@ WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
|
|
||||||
ENV urls="http://*:80"
|
ENV urls="http://*:80"
|
||||||
ENV ConnectionStrings__DatabaseConnection="***REMOVED***"
|
ENV ConnectionStrings__DatabaseConnection="*********************************"
|
||||||
ENV TZ=Europe/Bucharest
|
ENV TZ=Europe/Bucharest
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{
|
||||||
"urls": "http://*:5063",
|
"urls": "http://*:5063",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DatabaseConnection": "***REMOVED***"
|
"DatabaseConnection": "Server=######;Database=######;User Id=######;Password=######;MultipleActiveResultSets=true"
|
||||||
//"DatabaseConnection": "***REMOVED***"
|
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
|
|
|
@ -28,12 +28,6 @@
|
||||||
<None Update="Scripts\1.0.1\02.UserToken table.sql">
|
<None Update="Scripts\1.0.1\02.UserToken table.sql">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="Scripts\1.0.1\03.***REMOVED***.sql">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="Scripts\1.0.1\04.***REMOVED***.sql">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
if not exists (select top 1 1 from AppUser where UserName = '***REMOVED***')
|
|
||||||
begin
|
|
||||||
declare @activeStatusId int
|
|
||||||
select @activeStatusId = StatusId from UserStatus where StatusCode = 'ACTIVE'
|
|
||||||
|
|
||||||
insert into AppUser(UserName, [Password], FirstName, CreationDate, SecurityStamp, StatusId)
|
|
||||||
select '***REMOVED***' as UserName,
|
|
||||||
'***REMOVED***' as [Password],
|
|
||||||
***REMOVED*** as FirstName,
|
|
||||||
getdate() as CreationDate,
|
|
||||||
cast(newid() as varchar(100)) as SecurityStamp,
|
|
||||||
@activeStatusId as StatusId
|
|
||||||
end
|
|
|
@ -1,16 +0,0 @@
|
||||||
if not exists (select top 1 1 from AppUser where UserName = '***REMOVED***')
|
|
||||||
begin
|
|
||||||
declare @activeStatusId int
|
|
||||||
select @activeStatusId = StatusId from UserStatus where StatusCode = 'ACTIVE'
|
|
||||||
|
|
||||||
insert into AppUser(UserName, [Password], FirstName, LastName, Email, ProfilePictureUrl, CreationDate, SecurityStamp, StatusId)
|
|
||||||
select '***REMOVED***' as UserName,
|
|
||||||
'***REMOVED***' as [Password],
|
|
||||||
***REMOVED*** as FirstName,
|
|
||||||
***REMOVED*** as LastName,
|
|
||||||
'***REMOVED******REMOVED***' as Email,
|
|
||||||
***REMOVED*** as ProfilePictureUrl,
|
|
||||||
getdate() as CreationDate,
|
|
||||||
cast(newid() as varchar(100)) as SecurityStamp,
|
|
||||||
@activeStatusId as StatusId
|
|
||||||
end
|
|
10
Notes.txt
10
Notes.txt
|
@ -9,15 +9,13 @@ sc create IdentityServer.Api binPath= "<path_to_the_service_executable>"
|
||||||
#######################################################################################################################################################
|
#######################################################################################################################################################
|
||||||
Push language package:
|
Push language package:
|
||||||
|
|
||||||
dotnet nuget push IdentityServer.PublishedLanguage.1.1.0.nupkg -k ***REMOVED*** -s http://***REMOVED***/NuGetServer/nuget
|
dotnet nuget push IdentityServer.PublishedLanguage.1.1.0.nupkg -k ******** -s http://***REMOVED***/NuGetServer/nuget
|
||||||
dotnet nuget push IdentityServer.Wrapper.1.1.0.nupkg -k ***REMOVED*** -s http://***REMOVED***/NuGetServer/nuget
|
dotnet nuget push IdentityServer.Wrapper.1.1.0.nupkg -k ******** -s http://***REMOVED***/NuGetServer/nuget
|
||||||
#######################################################################################################################################################
|
#######################################################################################################################################################
|
||||||
|
|
||||||
TO DO:
|
TO DO:
|
||||||
- Cache for users
|
- Cache for users
|
||||||
|
|
||||||
#######################################################################################################################################################
|
|
||||||
Azure DevOps Repository Password: ***REMOVED***
|
|
||||||
#######################################################################################################################################################
|
#######################################################################################################################################################
|
||||||
Docker commands:
|
Docker commands:
|
||||||
*****************
|
*****************
|
||||||
|
@ -34,14 +32,14 @@ Push image to registry:
|
||||||
docker tag identity-server-api:1.0.1 cloud.canister.io:5000/tstanciu/identity-server:api-1.0.1
|
docker tag identity-server-api:1.0.1 cloud.canister.io:5000/tstanciu/identity-server:api-1.0.1
|
||||||
|
|
||||||
--login to registry
|
--login to registry
|
||||||
docker login --username=tstanciu --password="***REMOVED***" cloud.canister.io:5000
|
docker login --username=tstanciu --password="********" cloud.canister.io:5000
|
||||||
|
|
||||||
--push image
|
--push image
|
||||||
docker push cloud.canister.io:5000/tstanciu/identity-server:api-1.0.1
|
docker push cloud.canister.io:5000/tstanciu/identity-server:api-1.0.1
|
||||||
|
|
||||||
Pull image from registry
|
Pull image from registry
|
||||||
--login to registry with readonly rights
|
--login to registry with readonly rights
|
||||||
docker login --username=***REMOVED*** --password=***REMOVED*** cloud.canister.io:5000
|
docker login --username=***REMOVED*** --password=******** cloud.canister.io:5000
|
||||||
|
|
||||||
--pull image
|
--pull image
|
||||||
docker pull cloud.canister.io:5000/tstanciu/identity-server:api-1.0.1
|
docker pull cloud.canister.io:5000/tstanciu/identity-server:api-1.0.1
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<clear />
|
<clear />
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
<!--<add key="sta.nuget" value="http://***REMOVED***/nugetserver/nuget" />-->
|
|
||||||
<add key="sta.nuget" value="https://toodle.ddns.net/public-nuget-server/nuget" />
|
<add key="sta.nuget" value="https://toodle.ddns.net/public-nuget-server/nuget" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
|
@ -3,7 +3,7 @@
|
||||||
echo "Welcome!"
|
echo "Welcome!"
|
||||||
|
|
||||||
version="1.1.3-alpha3"
|
version="1.1.3-alpha3"
|
||||||
localRegistryPass="***REMOVED***"
|
localRegistryPass="************"
|
||||||
|
|
||||||
echo "Create docker image with version $version."
|
echo "Create docker image with version $version."
|
||||||
docker image build -t "identity-server:$version" -f "IdentityServer.Api/Dockerfile" .
|
docker image build -t "identity-server:$version" -f "IdentityServer.Api/Dockerfile" .
|
||||||
|
|
Loading…
Reference in New Issue