make it work !
This commit is contained in:
parent
69e86bfa26
commit
578b88cea2
1
.gitignore
vendored
1
.gitignore
vendored
@ -56,3 +56,4 @@ ManagerService/bin
|
||||
ManagerService/obj
|
||||
ManagerService/resources
|
||||
ManagerService/configurations
|
||||
ManagerService/service-data
|
||||
|
||||
@ -300,11 +300,13 @@ namespace ManagerService.Controllers
|
||||
|
||||
string currentDirectory = System.IO.Directory.GetCurrentDirectory();
|
||||
Console.WriteLine($"currentDirectory: {currentDirectory}");
|
||||
#if RELEASE
|
||||
Console.WriteLine($"currentDirectory: {Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}");
|
||||
//currentDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "service-data");
|
||||
currentDirectory = Path.Combine("/home", "debian", "service-data");
|
||||
currentDirectory = Path.Combine(currentDirectory, "service-data");
|
||||
System.IO.Directory.CreateDirectory(currentDirectory.ToString());
|
||||
Console.WriteLine($"createdDiretory: {currentDirectory}");
|
||||
#if RELEASE
|
||||
//Console.WriteLine($"currentDirectory: {Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}");
|
||||
//currentDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "service-data");
|
||||
|
||||
#endif
|
||||
|
||||
var resourcesDirectory = Path.Combine(currentDirectory, "resources");
|
||||
|
||||
@ -22,4 +22,5 @@ RUN dotnet publish "ManagerService.csproj" -c Release -o /app/publish
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "ManagerService.dll"]
|
||||
RUN mkdir -p /app/service-data
|
||||
ENTRYPOINT ["dotnet", "ManagerService.dll"]
|
||||
|
||||
@ -6,6 +6,14 @@
|
||||
<UserSecretsId>d2e1a747-e204-4b43-bf93-abbd19c46417</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>$(DefineConstants)TRACE;RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DefineConstants>$(DefineConstants)TRACE;RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.10.0" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user