using subdir

This commit is contained in:
Andy Pack 2023-05-01 09:10:51 +01:00
parent 92bfc10113
commit 2d983000cd
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -2,7 +2,8 @@ FROM rust:1.69 AS rust-build
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
COPY . ./
COPY . /draught
WORKDIR /draught
RUN wasm-pack build --release
RUN ls
@ -10,12 +11,14 @@ RUN cargo doc --no-deps --document-private-items
FROM node:18 AS js-build
COPY . ./
COPY --from=rust-build /pkg /pkg
WORKDIR /www
COPY . /draught
WORKDIR /draught
COPY --from=rust-build /draught/pkg /draught/pkg
WORKDIR /draught/www
RUN npm ci
RUN npm run build --if-present
COPY --from=rust-build /target/doc /www/dist/
COPY --from=rust-build /draught/target/doc /draught/www/dist/
FROM nginx
COPY --from=js-build /www/dist /usr/share/nginx/html/
COPY --from=js-build /draught/www/dist /usr/share/nginx/html/