Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker setup #23

Merged
merged 4 commits into from
Jul 1, 2024
Merged

Update Docker setup #23

merged 4 commits into from
Jul 1, 2024

Conversation

MatthewL246
Copy link
Member

Changes:

This updates the Dockerfile to use a new Docker Go template with a few minor changes, including running as a non-root user. This also adds a GitHub Action for building and pushing the Docker image to Docker Hub. This image is currently available at https://hub.docker.com/r/matthewl246/pretendo-friends and will be deleted when this PR is merged.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved

COPY . .
RUN --mount=type=cache,target=/go/pkg/mod/ \
CGO_ENABLED=0 go build -v -o ${app_dir}/build/server -ldflags "-X 'main.serverBuildString=${build_string}'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, what is the build string? Is this a Go/Pretendo thing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a Pretendo-specific thing. @jonbarrow can explain more accurately about what it does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@binaryoverload Every game server has 2 servers, the authentication server and the real server (called the "secure server"). The client must first pass through the authentication server before being given the address of the secure server

In the login methods the client uses for the authentication server, the servers build string is sent. It contains information about the server like it's build number, branch, NEX version, etc.

Most games don't care what is set here, but some do scan the build string for relevant data. So it must be set. For example Mario Kart 8 has the following build string branch:origin/project/nfs build:3_10_26_2006_0

@jonbarrow jonbarrow merged commit a383676 into PretendoNetwork:nex-go-rewrite Jul 1, 2024
1 check passed
@MatthewL246 MatthewL246 deleted the docker-updates branch July 2, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants