update dockerfile to make config

This commit is contained in:
realaravinth
2021-12-16 15:55:46 +05:30
parent b2297eab6d
commit 5ac0b36255
2 changed files with 24 additions and 11 deletions

View File

@@ -1,16 +1,21 @@
FROM node:16.0.0 as frontend
RUN set -ex; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends make
RUN mkdir -p /src/docs/openapi/
COPY package.json yarn.lock /src/
COPY docs/openapi/package.json docs/openapi/yarn.lock /src/docs/openapi/
WORKDIR /src
RUN yarn install && cd docs/openapi && yarn install
WORKDIR /src
RUN yarn install
WORKDIR /
RUN mkdir -p /src/static/cache/bundle
COPY tsconfig.json webpack.config.js jest.config.ts /src/
COPY templates /src/templates
WORKDIR /src
RUN yarn build
COPY templates /src/templates/
COPY docs/openapi /src/docs/openapi/
COPY Makefile /src/
COPY scripts /src/scripts
RUN /src/scripts/librejs.sh
RUN /src/scripts/cachebust.sh
RUN make frontend
FROM rust:latest as rust
WORKDIR /src
@@ -25,7 +30,7 @@ COPY src/settings.rs /src/src/settings.rs
RUN cargo --version
RUN cargo build --release
COPY . /src
COPY --from=frontend /src/static/cache/bundle /src/static/cache/bundle
COPY --from=frontend /src/static/cache/bundle/ /src/static/cache/bundle/
RUN cargo build --release
FROM debian:bullseye