using subdir
This commit is contained in:
parent
92bfc10113
commit
2d983000cd
15
Dockerfile
15
Dockerfile
@ -2,7 +2,8 @@ FROM rust:1.69 AS rust-build
|
|||||||
|
|
||||||
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|
||||||
COPY . ./
|
COPY . /draught
|
||||||
|
WORKDIR /draught
|
||||||
|
|
||||||
RUN wasm-pack build --release
|
RUN wasm-pack build --release
|
||||||
RUN ls
|
RUN ls
|
||||||
@ -10,12 +11,14 @@ RUN cargo doc --no-deps --document-private-items
|
|||||||
|
|
||||||
FROM node:18 AS js-build
|
FROM node:18 AS js-build
|
||||||
|
|
||||||
COPY . ./
|
COPY . /draught
|
||||||
COPY --from=rust-build /pkg /pkg
|
WORKDIR /draught
|
||||||
WORKDIR /www
|
|
||||||
|
COPY --from=rust-build /draught/pkg /draught/pkg
|
||||||
|
WORKDIR /draught/www
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
RUN npm run build --if-present
|
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
|
FROM nginx
|
||||||
COPY --from=js-build /www/dist /usr/share/nginx/html/
|
COPY --from=js-build /draught/www/dist /usr/share/nginx/html/
|
Loading…
Reference in New Issue
Block a user