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

Create Dockerfile #1222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nivertius
Copy link

This PR creates a Dockerfile that will build an image that will run evolve as a static page.

Docker file is platform-agnostic, as all of the base images are dockerhub library images and promised to be available for all supported platforms. It built well on my machine for both amd64 arch and armhf. Versions of the images are not precisely locked, as builder step is only restricted to node version 20. Runner image is more restricted though.

The Dockerfile is somewhat optimized, as it uses separate build step, and the resulting image only contains files needed to render the page and run scripts. The copy directives are also sorted from the least changing to the most changing, so layers should be preserved as much as possible. The resulting image is 24MB total, in which about 15MB is the game, and 9MB is nginx.

This PR also fixes the .gitignore as it excluded .* for some reason, so both .gitignore and .dockerignore are not processed by git. This is most unusual, and if there are some dot-files that should be ignored by git they should definitely be put explicitly by name in the .gitignore. As this is additional change only tangentially related to this PR, if it doesn't meet your need, I will revert it.

Lastly, the page starts without errors and plays well - I did a hell lord run without any issues on my own instance. But I did not analyze the whole code and there might be some resources that I overlooked, so I would appreciate more engaged maintainer to recheck if everything is included.

@fredden
Copy link
Contributor

fredden commented Oct 6, 2024

See also #1169

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