Update webhook Containerfile
This commit is contained in:
parent
aa189e9d5b
commit
069ef00777
2 changed files with 20 additions and 17 deletions
containers/webhook
|
@ -1,20 +1,22 @@
|
|||
FROM registry.fedoraproject.org/fedora:latest
|
||||
FROM docker.io/library/rust:latest AS chef
|
||||
RUN cargo install cargo-chef
|
||||
WORKDIR app
|
||||
|
||||
EXPOSE 80
|
||||
FROM chef AS planner
|
||||
COPY . .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
WORKDIR /volumes/src
|
||||
FROM chef AS builder
|
||||
RUN apt update && \
|
||||
apt install libsqlite3-dev -y
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
RUN cargo chef cook --release --recipe-path recipe.json
|
||||
COPY . .
|
||||
RUN cargo build --release --bin git-webhook-client
|
||||
|
||||
ENV DATABASE_URL=/volumes/db/db.sqlite
|
||||
ENV GWC_CONFIG_FILE=/volumes/src/config.yaml
|
||||
|
||||
RUN dnf upgrade -y && \
|
||||
dnf install -y git-lfs sqlite-devel npm && \
|
||||
dnf autoremove -y && \
|
||||
dnf clean all && \
|
||||
git lfs install && \
|
||||
curl -Ls https://github.com/getzola/zola/releases/latest/download/zola-v0.16.1-x86_64-unknown-linux-gnu.tar.gz -o zola.tar.gz && \
|
||||
tar -xzvf zola.tar.gz && \
|
||||
rm zola.tar.gz && \
|
||||
mv zola /usr/local/bin
|
||||
|
||||
CMD ["target/release/git-webhook-client"]
|
||||
FROM docker.io/library/debian:stable-slim AS runtime
|
||||
WORKDIR app
|
||||
RUN apt update && \
|
||||
apt install libsqlite3-dev -y
|
||||
COPY --from=builder /app/target/release/git-webhook-client /usr/local/bin/git-webhook-client
|
||||
CMD ["git-webhook-client"]
|
|
@ -22,4 +22,5 @@ podman-default-create \
|
|||
-v $container_volumes_dir/repos:/volumes/repos:Z \
|
||||
-v $container_volumes_dir/logs:/volumes/logs:Z \
|
||||
-v ~/volumes/nginx/sites:/volumes/sites:z \
|
||||
-e GWC_CONFIG_FILE=/volumes/src/dev_data/config.yaml \
|
||||
localhost/$container_name:latest
|
||||
|
|
Loading…
Add table
Reference in a new issue