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

build: Improve Docker support #36

Merged
merged 3 commits into from
Nov 17, 2024
Merged

build: Improve Docker support #36

merged 3 commits into from
Nov 17, 2024

Conversation

DocDvorak
Copy link

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.

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
Copy link
Author

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.

Copy link
Author

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

@DocDvorak DocDvorak changed the title Docker Compose deployment tweaks build: Improve Docker support Oct 29, 2024
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:
Copy link
Member

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.

Copy link
Author

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.

Copy link
Author

@DocDvorak DocDvorak Nov 11, 2024

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.

@admon84 admon84 merged commit 0d26196 into screepers:main Nov 17, 2024
2 checks passed
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.

2 participants