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

Embed static resources and templates into the site binary in release mode #1554

Merged
merged 1 commit into from Mar 31, 2023

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Mar 15, 2023

… and live-reload them in debug mode.

This makes the site binary self-contained, which enables it to be more easily distributed (e.g. from GH releases).

Binary size of the site binary:

Version Size (B) Size after strip (B)
before this PR 59733152 19013912
after this PR 59356184 18866032

Funnily enough, the binary is actually smaller after this PR (probably because of some dependency version or code changes).

Incremental rebuild time after a tiny change in debug mode:

before: 8.5s
after: 9.2s

I checked that the Docker image can be built and properly serves content even without the static and templates directories.

@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 30, 2023

Ping @Mark-Simulacrum.

@Kobzol Kobzol merged commit c85b6bc into master Mar 31, 2023
18 checks passed
@Kobzol Kobzol deleted the embed-resources branch March 31, 2023 07:20
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.

None yet

2 participants