cryptgeon/Dockerfile

26 lines
486 B
Docker
Raw Normal View History

# FRONTEND
FROM node:16-alpine as client
2021-05-02 13:53:48 +02:00
WORKDIR /tmp
RUN npm install -g pnpm@7
COPY ./frontend ./
2021-11-11 13:37:21 +01:00
RUN pnpm install
RUN pnpm run build
2021-05-02 13:53:48 +02:00
# BACKEND
FROM rust:1.61-alpine as backend
2021-05-02 13:53:48 +02:00
WORKDIR /tmp
RUN apk add libc-dev openssl-dev alpine-sdk
2022-01-02 23:46:08 +01:00
COPY ./backend ./
2021-05-02 13:53:48 +02:00
RUN cargo build --release
# RUNNER
FROM alpine
2021-05-02 13:53:48 +02:00
WORKDIR /app
COPY --from=backend /tmp/target/release/cryptgeon .
COPY --from=client /tmp/build ./frontend/build
ENV REDIS=redis://redis/
2021-05-08 10:16:05 +02:00
EXPOSE 5000
ENTRYPOINT [ "/app/cryptgeon" ]