feat: add docker configuration
This commit is contained in:
		
							parent
							
								
									821712f43b
								
							
						
					
					
						commit
						cf2f624ae4
					
				
					 21 changed files with 232 additions and 13 deletions
				
			
		
							
								
								
									
										22
									
								
								Dockerfile.backend
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Dockerfile.backend
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||||
| USER $APP_UID | ||||
| WORKDIR /app | ||||
| EXPOSE 5000 | ||||
| 
 | ||||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||||
| ARG BUILD_CONFIGURATION=Release | ||||
| WORKDIR /src | ||||
| COPY ["Foxnouns.Backend/Foxnouns.Backend.csproj", "Foxnouns.Backend/"] | ||||
| RUN dotnet restore "Foxnouns.Backend/Foxnouns.Backend.csproj" | ||||
| COPY . . | ||||
| WORKDIR "/src/Foxnouns.Backend" | ||||
| RUN dotnet build "Foxnouns.Backend.csproj" -c $BUILD_CONFIGURATION -o /app/build | ||||
| 
 | ||||
| FROM build AS publish | ||||
| ARG BUILD_CONFIGURATION=Release | ||||
| RUN dotnet publish "Foxnouns.Backend.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false | ||||
| 
 | ||||
| FROM base AS final | ||||
| WORKDIR /app | ||||
| COPY --from=publish /app/publish . | ||||
| ENTRYPOINT ["dotnet", "Foxnouns.Backend.dll", "--migrate-and-start"] | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue