Includes both the authentication and secure servers
Mostly functional, besides Ranking data.
Install Go and git, then clone and enter the repository
$ git clone https://github.com/PretendoNetwork/pokken-tournament
$ cd pokken-tournamentMake sure you have Docker installed on your system. This can be done using various instructions available online.
Once installed, execute the following to build:
$ docker build -t pokken-tournament --build-arg BUILD_STRING=YOUR_BUILD_STRING_HERE .
$ docker image prune --filter label=stage=builder -fNote: --build-arg flag/variable is optional.
Create a .env file with all of the necessary environment variables set. The variable list is available below.
Example:
PN_POKKENTOURNAMENT_AUTHENTICATION_SERVER_PORT=60008
PN_POKKENTOURNAMENT_SECURE_SERVER_HOST=192.168.1.2
PN_POKKENTOURNAMENT_SECURE_SERVER_PORT=60009
...
Then, you can use the following command to run the image.
$ docker run --name pokken-tournament --env-file .env -it pokken-tournamentOther tools and systems can also make use of this image, including Docker Compose and Portainer.
To compile using Go, go get the required modules and then go build to your desired location. You may also want to tidy the go modules, though this is optional
$ go get -u
$ go mod tidy
$ go build -o build/pokken-tournamentThe server is now built to build/pokken-tournament
When compiling with only Go, the authentication servers build string is not automatically set. This should not cause any issues with gameplay, but it means that the server build will not be visible in any packet dumps or logs a title may produce
To compile the servers with the authentication server build string, add -ldflags "-X 'main.serverBuildString=BUILD_STRING_HERE'" to the build command, or use make to compile the server
Compiling using make will read the local .git directory to create a dynamic authentication server build string, based on your repositories remote origin and current commit. It will also use the current folders name as the executables name
Install make onto your system (this varies by OS), and run make while inside the repository
$ makeThe server is now built to build/pokken-tournament with the authentication server build string already set
All configuration options are handled via environment variables
.env files are supported
| Name | Description | Required |
|---|---|---|
PN_POKKENTOURNAMENT_AUTHENTICATION_SERVER_PORT |
Port for the authentication server | Yes |
PN_POKKENTOURNAMENT_SECURE_SERVER_HOST |
Host name for the secure server (should point to the same address as the authentication server) | Yes |
PN_POKKENTOURNAMENT_SECURE_SERVER_PORT |
Port for the secure server | Yes |
PN_POKKENTOURNAMENT_ACCOUNT_GRPC_HOST |
Host name for your account server gRPC service | Yes |
PN_POKKENTOURNAMENT_ACCOUNT_GRPC_PORT |
Port for your account server gRPC service | Yes |
PN_POKKENTOURNAMENT_ACCOUNT_GRPC_API_KEY |
API key for your account server gRPC service | No (Assumed to be an open gRPC API) |
PN_POKKENTOURNAMENT_FRIENDS_GRPC_HOST |
Host name for your friends server gRPC service | Yes |
PN_POKKENTOURNAMENT_FRIENDS_GRPC_PORT |
Port for your friends server gRPC service | Yes |
PN_POKKENTOURNAMENT_FRIENDS_GRPC_API_KEY |
API key for your friends server gRPC service | No (Assumed to be an open gRPC API) |
PN_POKKENTOURNAMENT_POSTGRES_URI |
URI to PostgreSQL server (include credentials) | Yes |
PN_POKKENTOURNAMENT_S3_ENDPOINT |
Domain pointing to S3/S3-compatible storage server (MinIO) | Yes |
PN_POKKENTOURNAMENT_S3_ACCESS_KEY |
Access key to interact with S3 server | Yes |
PN_POKKENTOURNAMENT_S3_ACCESS_SECRET |
Access secret to interact with S3 server | Yes |
PN_POKKENTOURNAMENT_S3_BUCKET |
Bucket name on S3 server | Yes |