-
Notifications
You must be signed in to change notification settings - Fork 5
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
build: Improve Docker support #36
Conversation
This change aims to make it easier to build/deploy the proxy via Docker Compose from a clone of this repo. A .dockerignore file was created to reduce image size and improve the layer cache hit rate. This change also restricts external access to the web proxy port to the host machine by default. To revert to the old behavior, add the following environment variable: ``` SCREEPS_PROXY_HOST=0.0.0.0 ``` I also updated the docs with instructions on how to deploy on a machine that doesn't have Steam installed. `vendor/*.nw` was added to .gitignore/.dockerignore to prevent anybody using this approach from accidentally distributing the Screeps client package.
- "${SCREEPS_PROXY_HOST:-127.0.0.1}:8080:8080/tcp" | ||
depends_on: | ||
- screeps | ||
restart: unless-stopped |
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 there's interest, I can add an NPX cache volume to the Docker Compose + NPX example config to speed up initialization when the container is recreated.
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.
Added the NPM cache volume
SCREEPS_NW_PATH="~/Library/Application Support/Steam/steamapps/common/Screeps/package.nw" | ||
``` | ||
|
||
2. If Steam and/or Screeps is not installed locally, you can copy `package.nw` from a remote system and place it in the `vendor` subdirectory: |
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.
The old instructions promotes purchasing Screeps by only recommending it be installed through Steam. There's also logic to detect the local Steam installation path for easy setup when this proxy runs on the same system where Screeps is installed.
Suggesting the transfer of game files across different systems might inadvertently encourage sharing copies with others, which could negatively impact the developers' revenue.
I propose revising the README to avoid mentioning the movement of game files to different systems, ensuring we support the developers by promoting legitimate purchases and installations.
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.
Agreed. The goal of this change is not to promote piracy, but rather to facilitate the use of the purchased game on other systems a legal purchaser owns which do not have Steam installed. I'll make some tweaks to the language to reflect this.
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.
@admon84 I've added language to the "Requirements" section to explicitly encourage purchasing the game via Steam. The new section also points out the benefits of deploying the proxy on a system on which the game is installed via Steam.
The Steam store link for the game is still retained at the top of the README.
The package.nw
search logic has not been modified, and the changes to the README still retain the macOS example of the hard-coded path to the client binary from a local Steam installation.
This change aims to make it easier to build/deploy the proxy via Docker Compose from a clone of this repo.
A .dockerignore file was created to reduce image size and improve the layer cache hit rate.
This change also restricts external access to the web proxy port to the host machine by default. To revert to the old behavior, add the following environment variable:
I also updated the docs with instructions on how to deploy on a machine that doesn't have Steam installed.
vendor/*.nw
was added to .gitignore/.dockerignore to prevent anybody using this approach from accidentally distributing the Screeps client package.