diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..44b0036 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,27 @@ +# ---- Build Stage ---- +FROM mcr.microsoft.com/dotnet/sdk:9.0.302-alpine3.22 AS build +WORKDIR /app + +# Copy project file and restore dependencies +COPY backend.csproj ./ +RUN dotnet restore + +# Copy all source files and publish +COPY . ./ +RUN dotnet publish backend.csproj -c Release -o /app/out + +# ---- Runtime Stage ---- +FROM mcr.microsoft.com/dotnet/aspnet:9.0.7-bookworm-slim AS runtime +WORKDIR /app + +# Copy published output from build stage +COPY --from=build /app/out ./ + +# Expose the WebSocket port +EXPOSE 5151 + +# Bind to all network interfaces on port 5151 +ENV ASPNETCORE_URLS=http://+:5151 + +# Start the app +ENTRYPOINT ["dotnet", "backend.dll"] diff --git a/frontend/data/config.yaml b/frontend/data/config.yaml index 5063d09..690aed0 100644 --- a/frontend/data/config.yaml +++ b/frontend/data/config.yaml @@ -97,5 +97,5 @@ color: piece-ghost: "#9BFCF0" online: - server-url: "ws://localhost:5085" - #server-url: "ws://localhost:5001" + #server-url: "ws://localhost:5151" + server-url: "wss://api.tetris.onl"