ezidam: dont put relative path for static files, bundle them in docker image
This commit is contained in:
parent
7aa5c96f7a
commit
8365bc5dff
2 changed files with 2 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ RUN cargo build --release --target x86_64-unknown-linux-musl --package ezidam --
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=builder /ezidam/target/x86_64-unknown-linux-musl/release/ezidam /ezidam
|
COPY --from=builder /ezidam/target/x86_64-unknown-linux-musl/release/ezidam /ezidam
|
||||||
|
COPY crates/ezidam/static static
|
||||||
ENV ROCKET_CLI_COLORS=0
|
ENV ROCKET_CLI_COLORS=0
|
||||||
ENV ROCKET_ADDRESS=0.0.0.0
|
ENV ROCKET_ADDRESS=0.0.0.0
|
||||||
ENV ROCKET_PORT=8000
|
ENV ROCKET_PORT=8000
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ pub fn rocket_setup(rocket_builder: Rocket<Build>) -> Rocket<Build> {
|
||||||
let rocket_builder = rocket_builder.attach(Template::fairing());
|
let rocket_builder = rocket_builder.attach(Template::fairing());
|
||||||
|
|
||||||
// Static assets
|
// Static assets
|
||||||
let rocket_builder = rocket_builder.mount("/", FileServer::from(relative!("static")));
|
let rocket_builder = rocket_builder.mount("/", FileServer::from("static"));
|
||||||
|
|
||||||
// Routes
|
// Routes
|
||||||
let rocket_builder = routes::routes(rocket_builder);
|
let rocket_builder = routes::routes(rocket_builder);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue