diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..4e0791d --- /dev/null +++ b/.drone.yml @@ -0,0 +1,30 @@ +kind: pipeline +type: docker +name: BlazorProject + +steps: + + - name: build + image: mcr.microsoft.com/dotnet/sdk:6.0 + commands: + - cd myBlazorApp/ + - dotnet restore myBlazorApp.sln + - dotnet build myBlazorApp.sln -c Release --no-restore + + - name: generate-documentation + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer + failure: ignore + volumes: + - name: docs + path: /docs + commands: + - /entrypoint.sh + when: + branch: + - master + depends_on: [build] + + +volumes: +- name: docs + temp: {} \ No newline at end of file diff --git a/README.md b/README.md index eaf4c96..c6832fc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,22 @@ -# blazorCourse +# Blazor Project +*** +
+### Description + +For this project, we worked in pair with Lucie Bédouret and Lilian Breton. +This project was done in Blazor for the front end, and c# for the back. + +### Start the application + +To start our project, you have to be on the 'master' branch. Then, open our project on Visual studio, and you will be able to see our files. +If you want to start the project and see our incredible application, you have to launch the API before the project, or at least in the same time. +for this, you can go on the project launch options and chose to launch the 2 projects at the same time. +Otherwise, you can launch the API on one visual studio, and our project on a second one. +The work we did on located on the Inventory page. You can find it in the menu on the left. + +### Other precisions + +You may get an exception when you will move an item from the inventory for the first time (This error only appears on the first move). +We don't know where does it come from, Lucie never saw it but Lilian has this problem each time he launchs the application. +If this happens, no problem, just press continue one time, and everything will work perfectly after that. \ No newline at end of file diff --git a/myBlazorApp/.drone.yml b/myBlazorApp/.drone.yml new file mode 100644 index 0000000..61f96dd --- /dev/null +++ b/myBlazorApp/.drone.yml @@ -0,0 +1,21 @@ +kind: pipeline +type: docker +name: BlazorProject + +steps: + - name: generate-documentation + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer + failure: ignore + volumes: + - name: docs + path: /docs + commands: + - /entrypoint.sh + when: + branch: + - master + + +volumes: +- name: docs + temp: {} \ No newline at end of file diff --git a/myBlazorApp/myBlazorApp/Dockerfile b/myBlazorApp/myBlazorApp/Dockerfile new file mode 100644 index 0000000..557badb --- /dev/null +++ b/myBlazorApp/myBlazorApp/Dockerfile @@ -0,0 +1,22 @@ +#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:6.0 AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +WORKDIR /src +COPY ["myBlazorApp/myBlazorApp.csproj", "myBlazorApp/"] +RUN dotnet restore "myBlazorApp/myBlazorApp.csproj" +COPY . . +WORKDIR "/src/myBlazorApp" +RUN dotnet build "myBlazorApp.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "myBlazorApp.csproj" -c Release -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "myBlazorApp.dll"] \ No newline at end of file