diff --git a/Verax_API_EF/.dockerignore b/Verax_API_EF/.dockerignore
new file mode 100644
index 0000000..cd967fc
--- /dev/null
+++ b/Verax_API_EF/.dockerignore
@@ -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
\ No newline at end of file
diff --git a/Verax_API_EF/Dockerfile b/Verax_API_EF/Dockerfile
deleted file mode 100644
index 3f128a1..0000000
--- a/Verax_API_EF/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
-WORKDIR /
-COPY . Verax/
-RUN dotnet restore /Verax/Verax_API_EF/Verax_API_EF.sln
-RUN dotnet publish -c Release -o out --no-restore /Verax/Verax_API_EF/Verax_API_EF.sln
-
-FROM mcr.microsoft.com/dotnet/aspnet:8.0
-WORKDIR /
-COPY --from=build-env /out .
-ENV DOTNET_HOSTBUILDER__RELOADCONFIGONCHANGE=false
-ENTRYPOINT ["dotnet", "API.dll"]
\ No newline at end of file
diff --git a/Verax_API_EF/Verax_API_EF/API/API.csproj b/Verax_API_EF/Verax_API_EF/API/API.csproj
index 263970e..e2e9c7d 100644
--- a/Verax_API_EF/Verax_API_EF/API/API.csproj
+++ b/Verax_API_EF/Verax_API_EF/API/API.csproj
@@ -6,6 +6,7 @@
enable
true
$(MSBuildProjectDirectory)
+ Linux
@@ -32,4 +33,10 @@
+
+
+ .dockerignore
+
+
+
diff --git a/Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json b/Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json
index 2f32278..b8f34d4 100644
--- a/Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json
+++ b/Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json
@@ -29,13 +29,6 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
- "Docker": {
- "commandName": "Docker",
- "launchBrowser": true,
- "applicationUrl": "https://codefirst.iut.uca.fr/containers/Verax-verax-api/:{ServicePort}/swagger",
- "publishAllPorts": true,
- "useSSL": true
- },
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
diff --git a/Verax_API_EF/Verax_API_EF/API/log.txt b/Verax_API_EF/Verax_API_EF/API/log.txt
index 8b21755..d59dacb 100644
--- a/Verax_API_EF/Verax_API_EF/API/log.txt
+++ b/Verax_API_EF/Verax_API_EF/API/log.txt
@@ -1679,3 +1679,85 @@ info: 03/26/2024 16:14:07.094 RelationalEventId.CommandExecuted[20101] (Microsof
ORDER BY "MigrationId";
info: 03/26/2024 16:14:07.103 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
+info: 04/02/2024 07:49:44.132 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (14ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:49:44.137 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:49:44.148 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT "MigrationId", "ProductVersion"
+ FROM "__EFMigrationsHistory"
+ ORDER BY "MigrationId";
+info: 04/02/2024 07:49:44.159 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
+ No migrations were applied. The database is already up to date.
+info: 04/02/2024 07:49:59.839 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:49:59.843 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:49:59.849 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT "MigrationId", "ProductVersion"
+ FROM "__EFMigrationsHistory"
+ ORDER BY "MigrationId";
+info: 04/02/2024 07:49:59.858 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
+ No migrations were applied. The database is already up to date.
+info: 04/02/2024 07:50:19.847 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:50:19.853 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:50:19.859 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT "MigrationId", "ProductVersion"
+ FROM "__EFMigrationsHistory"
+ ORDER BY "MigrationId";
+info: 04/02/2024 07:50:19.868 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
+ No migrations were applied. The database is already up to date.
+info: 04/02/2024 07:50:26.477 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
+ FROM "ArticleSet" AS "a"
+info: 04/02/2024 07:51:44.809 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:51:44.814 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:51:44.820 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT "MigrationId", "ProductVersion"
+ FROM "__EFMigrationsHistory"
+ ORDER BY "MigrationId";
+info: 04/02/2024 07:51:44.829 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
+ No migrations were applied. The database is already up to date.
+info: 04/02/2024 07:52:34.803 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:52:34.808 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:52:34.815 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT "MigrationId", "ProductVersion"
+ FROM "__EFMigrationsHistory"
+ ORDER BY "MigrationId";
+info: 04/02/2024 07:52:34.823 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
+ No migrations were applied. The database is already up to date.
+info: 04/02/2024 07:52:47.034 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:52:47.037 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
+info: 04/02/2024 07:52:47.044 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
+ Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
+ SELECT "MigrationId", "ProductVersion"
+ FROM "__EFMigrationsHistory"
+ ORDER BY "MigrationId";
+info: 04/02/2024 07:52:47.051 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
+ No migrations were applied. The database is already up to date.
diff --git a/Verax_API_EF/Verax_API_EF/Dockerfile b/Verax_API_EF/Verax_API_EF/Dockerfile
new file mode 100644
index 0000000..6fec9de
--- /dev/null
+++ b/Verax_API_EF/Verax_API_EF/Dockerfile
@@ -0,0 +1,33 @@
+FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
+WORKDIR /app
+
+EXPOSE 80
+EXPOSE 443
+EXPOSE 8080
+EXPOSE 8081
+
+FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+ARG BUILD_CONFIGURATION=Release
+WORKDIR /src
+COPY ["API/API.csproj", "API/"]
+COPY ["API_DbDataManager/API_DbDataManager.csproj", "API_DbDataManager/"]
+COPY ["API_Services/API_Services.csproj", "API_Services/"]
+COPY ["Entities/Entities.csproj", "Entities/"]
+COPY ["Model/Model.csproj", "Model/"]
+COPY ["DbContextLib/DbContextLib.csproj", "DbContextLib/"]
+COPY ["StubbedContextLib/StubbedContextLib.csproj", "StubbedContextLib/"]
+COPY ["API_Mapping/API_Mapping.csproj", "API_Mapping/"]
+COPY ["API_Model/API_Model.csproj", "API_Model/"]
+RUN dotnet restore "API/API.csproj"
+COPY . .
+WORKDIR "/src/API"
+RUN dotnet build "API.csproj" -c $BUILD_CONFIGURATION -o /app/build
+
+FROM build AS publish
+ARG BUILD_CONFIGURATION=Release
+RUN dotnet publish "API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "API.dll"]