Docker prod build
See comments here: https://www.reddit.com/r/rust/comments/6u27xp/my_dockerized_rocket_diesel_and_react_starter/
Multi-stage build + diesel embed_migrations!() (http://docs.diesel.rs/diesel/macro.embed_migrations.html) is probably the way to go.
Alpine + musl??
@ghotiphud link to embed_migrations is now broken.
Also, an example as to how to use embed_migrations would be super useful if you already have a clue how to ! It's not easy yet to find anything on the web about how to use that properly
Well, here's the updated link: https://docs.rs/diesel/0.16.0/diesel/macro.embed_migrations.html
The basic usage is
embed_migrations!("../migrations/sqlite");
fn main() {
let connection = establish_connection();
// This will run the necessary migrations.
embedded_migrations::run(&connection);
// By default the output is thrown out. If you want to redirect it to stdout, you
// should call embedded_migrations::run_with_output.
embedded_migrations::run_with_output(&connection, &mut std::io::stdout());
}
which as far as I know, basically does an include_str!() (https://doc.rust-lang.org/std/macro.include_str.html) for all the files in your migrations directory.