question

Yuriy Granin avatar image
Yuriy Granin asked

Playfab TCP and UDP game ports routing.

Hello! Is it possible in the Multiplayer Server Builds to route TCP and UDP game ports to the same Playfab ports? E.g. 7777 TCP and 7777 UDP route to 30103 TCP and 30103 UDP.

multiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
marcowilliamspf avatar image
marcowilliamspf answered

I believe you can do this through using the dockerfile.

EXPOSE 3600/tcp
EXPOSE 3600/udp

Here is my dockerfile for my darkrift server example which runs on MPS.

FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src


COPY DarkRiftCore.Plugins/DarkRiftCore.Plugins.csproj DarkRiftCore.Plugins/
RUN dotnet restore "DarkRiftCore.Plugins/DarkRiftCore.Plugins.csproj"


COPY GameServer/GameServer.csproj GameServer/
RUN dotnet restore "GameServer/GameServer.csproj"


COPY . .


WORKDIR "/src/DarkRiftCore.Plugins"
RUN dotnet build "DarkRiftCore.Plugins.csproj" -c PlayFab -o /app/build/Plugins


FROM build AS plugins
RUN dotnet publish "DarkRiftCore.Plugins.csproj" -c PlayFab -o /app/publish/Plugins


WORKDIR "/src/GameServer"
RUN dotnet build "GameServer.csproj" -c PlayFab -o /app/build


FROM plugins AS publish
RUN dotnet publish "GameServer.csproj" -c PlayFab -o /app/publish


FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .


RUN mkdir -p /app/publish/Data
RUN mkdir -p /app/publish/Logs


EXPOSE 3600/tcp
EXPOSE 3600/udp


ENTRYPOINT ["dotnet", "GameServer.dll"]
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.