-
Notifications
You must be signed in to change notification settings - Fork 813
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
Docs for running docker-compose locally with SDK and server #3390
Docs for running docker-compose locally with SDK and server #3390
Conversation
Build Succeeded 👏 Build Id: 3bbf8e67-765b-4952-a115-dbf3f0055f3a The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay! I've wanted this for ages!
- "127.0.0.1:7777:7777/udp" | ||
|
||
sdk-server: | ||
image: "us-docker.pkg.dev/agones-images/release/agones-sdk:1.34.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image: "us-docker.pkg.dev/agones-images/release/agones-sdk:1.34.0" | |
image: "us-docker.pkg.dev/agones-images/release/agones-sdk:{{<release-version>}}" |
Should work (I think 😃)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
version: '3' | ||
services: | ||
gameserver: | ||
build: . # <location to your image here> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is build
a path to the image, or a path to the build context?
(Just looking at https://docs.docker.com/compose/compose-file/compose-file-v3/#build ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good question. build
is to the context, but also defaults to assuming Dockerfile
is at the root of that path. Happy to split this out to make more explicit for the docs like what is shown in that second example in your link. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated verbiage here to # <path to build context>
@@ -158,6 +158,34 @@ chmod o+r gameserver.yaml | |||
docker run --network=host --rm -v $(pwd)/gameserver.yaml:/tmp/gameserver.yaml us-docker.pkg.dev/agones-images/release/agones-sdk:{{<release-version>}} --local -f /tmp/gameserver.yaml | |||
``` | |||
|
|||
If you would like to run the ClientSDK and your game server container together with Docker Compose create a `docker-compose.yaml` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add an extra note here that's something like...
If you would like to run the ClientSDK and your game server container together with Docker Compose create a `docker-compose.yaml` file. | |
if you run Docker on a OS that doesn't run Docker natively or in a VM, such as on Windows or macOS., you may want to to run the ClientSDK and your game server container together with Docker Compose . To do so, create a `docker-compose.yaml` file setup with a network overlay shared between them: |
Just so people have a why on they might want to do this.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like, makes sense. Updated in latest commit.
sdk-server: | ||
image: "us-docker.pkg.dev/agones-images/release/agones-sdk:1.34.0" | ||
command: --local -f /gs_config | ||
network_mode: service:gameserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we want an extra comment here explaining that this is the shared network?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good idea. I added a comment in the code block pointing this out: # <shared network between sdk and game server>
Build Succeeded 👏 Build Id: c018a4d6-b192-44e3-ba60-58f4747aae22 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
@@ -158,6 +158,34 @@ chmod o+r gameserver.yaml | |||
docker run --network=host --rm -v $(pwd)/gameserver.yaml:/tmp/gameserver.yaml us-docker.pkg.dev/agones-images/release/agones-sdk:{{<release-version>}} --local -f /tmp/gameserver.yaml | |||
``` | |||
|
|||
If you run Docker on a OS that doesn't run Docker natively or in a VM, such as on Windows or macOS, you may want to to run the ClientSDK and your game server container together with Docker Compose. To do so, create a `docker-compose.yaml` file setup with a network overlay shared between them: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you run Docker on a OS that doesn't run Docker natively or in a VM, such as on Windows or macOS, you may want to to run the ClientSDK and your game server container together with Docker Compose. To do so, create a `docker-compose.yaml` file setup with a network overlay shared between them: | |
If you run Docker on a OS that doesn't run Docker natively or in a VM, such as on Windows or macOS, you may want to to run the ClientSDK and your game server container together with [Docker Compose](https://docs.docker.com/compose/). To do so, create a `docker-compose.yaml` file setup with a network overlay shared between them: |
One final improvement I'd like to see - otherwise, this is good to go 👍🏻
Build Succeeded 👏 Build Id: 67808ebc-262c-4f24-9da4-487cd8f7d99d The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markmandel, mbychkowski The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
New changes are detected. LGTM label has been removed. |
Build Succeeded 👏 Build Id: 66e21008-330c-4ca5-acd9-74d1593339f9 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
What this PR does / Why we need it:
Simplify running Client SDK and game server locally for troubleshooting and testing by using Docker Compose to run both in one step.
Which issue(s) this PR fixes:
Relevant issue/comment