-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update deployment.md #99
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,19 @@ For example: | |
heroku buildpacks:add -i 1 https://github.com/emk/heroku-buildpack-rust.git | ||
echo "RUST_SKIP_BUILD=1" > RustConfig | ||
``` | ||
|
||
### Deploying with Docker | ||
|
||
Make sure rust is installed prior to running `mix deps.compile`. You can see examples of what commands to include in your Dockerfile by looking at the official rust Dockerfiles. For example, here are the commands for [`alpine3.11`](https://github.com/rust-lang/docker-rust/blob/009cc0a821ff773d54875350312731ed490d5cce/1.43.1/alpine3.11/Dockerfile) based images. | ||
|
||
If your Dockerfile is separated into a `build stage` and a `release stage` rust only needs to be installed during the build phase. **However**, your image will need to have `libcc` installed during the `release stage`. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add something like "For example, Alpine does not have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the delay!! I just noticed! Thank you for fixing and improving the PR!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a problem, thank you for figuring this out and writing it up in the first place. |
||
``` | ||
RUN apk add --no-cache libgcc | ||
``` | ||
|
||
You will also need to have the folloing environment variable set during the `build` stage or else `mix compile` will fail. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "following", not "folloing" |
||
|
||
``` | ||
RUSTFLAGS='--codegen target-feature=-crt-static' | ||
``` |
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.
libgcc
, notlibcc