2024-03-18 15:12:39 +00:00
FROM rust:latest as chef
RUN apt-get update -y && \
apt-get install -y pkg-config libssl-dev
# ENV OPENSSL_DIR=/usr
RUN rustup default nightly
2024-03-11 16:37:24 +00:00
RUN cargo install cargo-chef
2024-03-18 15:12:39 +00:00
WORKDIR /apps
2024-03-11 16:37:24 +00:00
FROM chef as planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef as builder
2024-03-18 15:12:39 +00:00
COPY --from= planner /apps/recipe.json recipe.json
#--target=x86_64-unknown-linux-musl
RUN cargo chef cook --release --recipe-path= recipe.json
2024-03-11 16:37:24 +00:00
COPY . .
2024-03-18 15:12:39 +00:00
RUN cargo build --release
2024-03-11 16:37:24 +00:00
2024-04-03 17:47:23 +00:00
2024-03-18 15:12:39 +00:00
FROM debian:bookworm-slim as chef-sitemap-generator
2024-04-03 17:47:23 +00:00
WORKDIR /app
COPY --from= builder /apps/target/release/sitemap-generator .
COPY ./sitemap-generator/public ./public
2024-03-18 15:12:39 +00:00
RUN apt-get update -y && \
apt-get install -y pkg-config libssl-dev curl
RUN mkdir /sitemaps
CMD [ "./sitemap-generator" ]
2024-03-11 16:37:24 +00:00
LABEL service = chef-sitemap-generator
LABEL org.opencontainers.image.title= "djkato/saleor-sitemap-generator" \
org.opencontainers.image.description= "Creates and keeps Sitemap.xml uptodate with Saleor." \
org.opencontainers.image.url= "https://github.com/djkato/saleor-apps-rs" \
org.opencontainers.image.source= "https://github.com/djkato/saleor-apps-rs" \
org.opencontainers.image.authors= "Djkáťo <djkatovfx@gmail.com>" \
org.opencontainers.image.licenses= "PolyForm-Noncommercial-1.0.0"
2024-04-03 17:47:23 +00:00
2024-03-18 15:12:39 +00:00
FROM debian:bookworm-slim as chef-simple-payment-gateway
2024-04-03 17:47:23 +00:00
WORKDIR /app
COPY --from= builder /apps/target/release/simple-payment-gateway .
COPY ./simple-payment-gateway/public ./public
2024-03-18 15:12:39 +00:00
RUN apt-get update -y && \
apt-get install -y pkg-config libssl-dev curl
CMD [ "./simple-payment-gateway" ]
2024-03-11 16:37:24 +00:00
LABEL service = chef-simple-payment-gateway
LABEL org.opencontainers.image.title= "djkato/saleor-simple-payment-gateway" \
org.opencontainers.image.description= "Payment gateway that adds payment methods that don't need actual verification: Cash on delivery, Cash on warehouse pickup, bank tranfer." \
org.opencontainers.image.url= "https://github.com/djkato/saleor-apps-rs" \
org.opencontainers.image.source= "https://github.com/djkato/saleor-apps-rs" \
org.opencontainers.image.authors= "Djkáťo <djkatovfx@gmail.com>" \
org.opencontainers.image.licenses= "PolyForm-Noncommercial-1.0.0"