Add cli & lib crates
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
###################
|
||||
### BUILD STAGE ###
|
||||
###################
|
||||
FROM rust:1.47 as build_stage
|
||||
FROM rust:1.51 as build_stage
|
||||
|
||||
# Install build dependencies
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
@ -9,7 +9,9 @@ RUN rustup target add x86_64-unknown-linux-musl
|
||||
# Build project
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
WORKDIR /app/server
|
||||
RUN cargo build --release --target x86_64-unknown-linux-musl
|
||||
WORKDIR /app
|
||||
RUN strip target/x86_64-unknown-linux-musl/release/stl
|
||||
|
||||
########################
|
||||
@ -29,8 +31,8 @@ VOLUME "/database"
|
||||
WORKDIR /
|
||||
|
||||
# Copy static files
|
||||
COPY templates templates
|
||||
COPY static static
|
||||
COPY server/templates templates
|
||||
COPY server/static static
|
||||
|
||||
# Copy application binary
|
||||
COPY --from=build_stage /app/target/x86_64-unknown-linux-musl/release/stl stl
|
||||
|
||||
Reference in New Issue
Block a user