Add docker for web
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kasper Juul Hermansen 2022-07-18 23:12:01 +02:00
parent ea61ba9ed7
commit 5f90d663cf
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,12 @@
FROM node:16-alpine as web_builder
WORKDIR /usr/src/scel/web
COPY src/web/ .
RUN --mount=type=cache,target=/usr/src/scel/web/dist yarn
RUN --mount=type=cache,target=/usr/src/scel/web/dist yarn build
FROM rust:1.60 as builder
WORKDIR /usr/src/scel
@ -17,5 +26,6 @@ RUN python3 -m pip install -U yt-dlp
# Copy binary
COPY --from=builder /usr/local/cargo/bin/scel /usr/local/bin/scel
COPY --from=web_builder /usr/src/scel/web/dist /src/web/dist
CMD ["scel"]

1
src/web/.dockerignore Normal file
View File

@ -0,0 +1 @@
node_modules/