Prepare Guess That Song for Coolify deployment

This commit is contained in:
Michal Vrba
2026-10-18 14:48:18 +02:00
parent c58c69e923
commit 3508e1e211
4 changed files with 60 additions and 2 deletions
+25
View File
@@ -0,0 +1,25 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /source
COPY src/GuessTheSong.Shared/GuessTheSong.Shared.csproj src/GuessTheSong.Shared/
COPY src/GuessTheSong.Client/GuessTheSong.Client.csproj src/GuessTheSong.Client/
RUN dotnet restore src/GuessTheSong.Client/GuessTheSong.Client.csproj
COPY src/GuessTheSong.Shared/ src/GuessTheSong.Shared/
COPY src/GuessTheSong.Client/ src/GuessTheSong.Client/
RUN dotnet publish src/GuessTheSong.Client/GuessTheSong.Client.csproj \
--configuration Release \
--output /artifacts/client \
--no-restore
FROM nginxinc/nginx-unprivileged:alpine AS final
COPY nginx.guess-the-song.conf /etc/nginx/conf.d/default.conf
COPY --from=build /artifacts/client/wwwroot/ /usr/share/nginx/html/
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget --quiet --tries=1 --spider http://127.0.0.1:8080/health || exit 1
+15
View File
@@ -0,0 +1,15 @@
.git
.gitignore
.vs
**/bin
**/obj
**/*.user
**/*.suo
**/appsettings.Development.json
src/Aquarium.Client
src/Aquarium.Server
src/Aquarium.Shared
src/WebsiteDna.Client
src/WebsiteDna.Server
src/WebsiteDna.Shared
+18
View File
@@ -0,0 +1,18 @@
server {
listen 8080;
listen [::]:8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /health {
access_log off;
default_type text/plain;
return 200 "healthy\n";
}
location / {
try_files $uri $uri/ /index.html;
}
}
@@ -9,8 +9,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.12" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.12" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.13" PrivateAssets="all" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>