survey/Dockerfile
Renovate Bot 05f27518d4
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
chore(deps): update node.js to v20
2024-06-08 13:05:35 +00:00

24 lines
768 B
Docker

FROM node:20-bookworm-slim as frontend
LABEL org.opencontainers.image.source https://github.com/mCaptcha/survey
RUN apt-get update && apt-get install -y make
COPY package.json yarn.lock /src/
COPY vendor/ /src/vendor
WORKDIR /src
RUN yarn install
COPY . .
RUN make frontend
FROM rust:latest as rust
WORKDIR /src
RUN apt-get update && apt-get install -y git libssl-dev
COPY . /src
COPY --from=frontend /src/static/cache/bundle /src/static/cache/bundle
RUN cargo build --release
FROM debian:bookworm
RUN useradd -ms /bin/bash -u 1001 mcaptcha-survey
WORKDIR /home/mcaptcha-survey
COPY --from=rust /src/target/release/survey /usr/local/bin/
COPY --from=rust /src/config/default.toml /etc/mcaptcha-survey/config.toml
USER mcaptcha-survey
CMD [ "/usr/local/bin/survey" ]