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

Provider assets #159

Merged
merged 10 commits into from
May 31, 2022
Merged

Provider assets #159

merged 10 commits into from
May 31, 2022

Conversation

aleksrutins
Copy link
Contributor

@aleksrutins aleksrutins commented May 31, 2022

This pull request adds static assets support for providers. It uses a new static_assets method in Provider that returns a HashMap with filenames as keys and file contents as values. It puts files into /assets in the Docker container, and you can get the path to an asset by calling app.asset_path(name: &str).

See #158

Copy link
Contributor

@coffee-cup coffee-cup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! A few small comments.

Also, this doesn't seem to work with sub directories (i.e. specifying dir/hello.txt as the filename). It errors when attempting to copy the files. I think we should support this case or show a better error than

image

src/nixpacks/mod.rs Outdated Show resolved Hide resolved
src/providers/mod.rs Outdated Show resolved Hide resolved
@aleksrutins
Copy link
Contributor Author

Should all hopefully be resolved now.

Copy link
Contributor

@coffee-cup coffee-cup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :D

@coffee-cup coffee-cup merged commit e25f285 into railwayapp:main May 31, 2022
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