Translate to monolithic architecture
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
FROM rust AS builder
|
||||
|
||||
WORKDIR /usr/src/qrust
|
||||
COPY . .
|
||||
|
||||
ENV SQLX_OFFLINE true
|
||||
|
||||
RUN mkdir src && echo "fn main() {}" > src/main.rs
|
||||
COPY Cargo.toml .sqlx ./
|
||||
RUN cargo build --release
|
||||
RUN rm -rf src
|
||||
|
||||
COPY . .
|
||||
RUN cargo build --release
|
||||
|
||||
FROM frolvlad/alpine-glibc AS assets
|
||||
WORKDIR /usr/src/assets
|
||||
COPY --from=builder /usr/src/qrust/target/release/assets .
|
||||
FROM frolvlad/alpine-glibc AS backend
|
||||
|
||||
WORKDIR /usr/src/qrust
|
||||
|
||||
COPY --from=builder /usr/src/qrust/target/release/backend .
|
||||
COPY log4rs.yaml .
|
||||
|
||||
EXPOSE 7878
|
||||
CMD ["./assets"]
|
||||
CMD ["./qrust"]
|
||||
|
Reference in New Issue
Block a user