Init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/.idea
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
## --- .NET / C# ---
|
||||
bin/
|
||||
obj/
|
||||
/TestResults/
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
## --- JetBrains Rider ---
|
||||
.idea/
|
||||
*.sln.iml
|
||||
# Falls du Rider-eigene Run-Configurations teilst,
|
||||
# kannst du die nächste Zeile mit # auskommentieren:
|
||||
.idea/runConfigurations/
|
||||
|
||||
## --- Visual Studio ---
|
||||
.vs/
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
x86/
|
||||
|
||||
## --- Docker / Compose ---
|
||||
# Wir ignorieren lokale Environment-Dateien, die Secrets enthalten könnten
|
||||
.env
|
||||
!.env.example
|
||||
|
||||
## --- Datenbank / EF Core ---
|
||||
# Falls du SQLite zum Testen nutzt (sonst unwichtig für Postgres)
|
||||
*.db
|
||||
*.db-shm
|
||||
*.db-wal
|
||||
|
||||
## --- OS spezifisch ---
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
## --- User Secrets (Wichtig für dein Google Auth!) ---
|
||||
# User Secrets liegen normalerweise außerhalb des Projektordners,
|
||||
# aber zur Sicherheit:
|
||||
secrets.json
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OakArchive", "OakArchive\OakArchive.csproj", "{8FAFD11C-C933-438D-8A95-FC348A8B4E40}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9132EA22-EB6C-448D-A112-85A8D01BDD54}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
compose.yaml = compose.yaml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8FAFD11C-C933-438D-8A95-FC348A8B4E40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8FAFD11C-C933-438D-8A95-FC348A8B4E40}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8FAFD11C-C933-438D-8A95-FC348A8B4E40}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8FAFD11C-C933-438D-8A95-FC348A8B4E40}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,23 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
|
||||
USER $APP_UID
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["OakArchive/OakArchive.csproj", "OakArchive/"]
|
||||
RUN dotnet restore "OakArchive/OakArchive.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/OakArchive"
|
||||
RUN dotnet build "./OakArchive.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./OakArchive.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "OakArchive.dll"]
|
||||
@@ -0,0 +1,40 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\.dockerignore">
|
||||
<Link>.dockerignore</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.7">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Entities\CardMarket\" />
|
||||
<Folder Include="Entities\Cards\" />
|
||||
<Folder Include="Entities\Collection\" />
|
||||
<Folder Include="Entities\TCGdex\" />
|
||||
<Folder Include="Entities\User\" />
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace OakArchive;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"applicationUrl": "http://localhost:5050",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
oakarchive:
|
||||
image: oakarchive
|
||||
build:
|
||||
context: .
|
||||
dockerfile: OakArchive/Dockerfile
|
||||
# Falls die DB in einer anderen Datei ist, nimm depends_on raus,
|
||||
# da Compose nur Services innerhalb derselben Datei überwachen kann.
|
||||
networks:
|
||||
- postgres-network
|
||||
environment:
|
||||
# WICHTIG: Host muss der 'container_name' oder 'service_name' der DB sein
|
||||
- CONNECTION_STRING=Host=OmniDB;Database=oak_db;Username=admin;Password=${DB_PASSWORD}
|
||||
|
||||
networks:
|
||||
postgres-network:
|
||||
external: true
|
||||
Reference in New Issue
Block a user