use docker as build system
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
4295e93134
commit
b853ed3e98
2 changed files with 11 additions and 27 deletions
16
Dockerfile
16
Dockerfile
|
@ -1,8 +1,16 @@
|
|||
FROM rust:bookworm AS builder
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM debian:12-slim
|
||||
|
||||
RUN apt update && apt install libssl3 && rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/*
|
||||
|
||||
COPY target/release/backend-${TARGETARCH} /usr/bin/gorb-backend
|
||||
COPY --from=builder /src/target/release/backend /usr/bin/gorb-backend
|
||||
|
||||
COPY entrypoint.sh /usr/bin/entrypoint.sh
|
||||
|
||||
|
@ -10,10 +18,6 @@ RUN useradd --create-home --home-dir /gorb gorb
|
|||
|
||||
USER gorb
|
||||
|
||||
ENV DATABASE_USERNAME="gorb"
|
||||
ENV DATABASE_PASSWORD="gorb"
|
||||
ENV DATABASE="gorb"
|
||||
ENV DATABASE_HOST="localhost"
|
||||
ENV DATABASE_PORT="5432"
|
||||
ENV DATABASE_USERNAME="gorb" DATABASE_PASSWORD="gorb" DATABASE="gorb" DATABASE_HOST="localhost" DATABASE_PORT="5432"
|
||||
|
||||
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue