2023-04-16 16:04:14 +02:00
|
|
|
FROM rust:1.68 AS bin-builder
|
|
|
|
|
|
|
|
RUN export DEBIAN_FRONTEND=noninteractive && \
|
|
|
|
apt-get update && \
|
2023-04-16 18:10:48 +02:00
|
|
|
apt-get install clang nettle-dev -y
|
2023-04-16 16:27:39 +02:00
|
|
|
COPY backend .
|
2023-04-16 16:04:14 +02:00
|
|
|
RUN cargo build --release
|
|
|
|
|
|
|
|
|
|
|
|
FROM node:19 AS webpage-builder
|
|
|
|
|
|
|
|
COPY website .
|
|
|
|
RUN npm install -g pnpm && \
|
|
|
|
pnpm install && \
|
|
|
|
pnpm run build
|
|
|
|
COPY assets assets
|
|
|
|
RUN mv dist assets/webpage
|
|
|
|
|
|
|
|
|
|
|
|
FROM debian:bullseye-slim
|
|
|
|
|
|
|
|
WORKDIR /simplewkd
|
2023-04-16 18:10:48 +02:00
|
|
|
RUN adduser --no-create-home simplewkd && \
|
2023-04-16 16:04:14 +02:00
|
|
|
chown -R simplewkd:simplewkd /simplewkd && \
|
|
|
|
chmod -R 777 /simplewkd
|
|
|
|
USER simplewkd
|
|
|
|
COPY --from=webpage-builder assets assets
|
|
|
|
COPY --from=bin-builder target/release/simple-wkd simple-wkd
|