CI: Add Dockerfile just containing the ui files

This commit is contained in:
nemunaire 2021-09-05 06:02:45 +02:00
parent 5fa94ecbed
commit 9367d99a05
2 changed files with 31 additions and 0 deletions

View File

@ -179,6 +179,21 @@ steps:
branch:
- master
- name: docker frontend ui
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: nemunaire/fic-frontend-ui
auto_tag: true
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
dockerfile: Dockerfile-frontend-ui
when:
branch:
- master
- name: docker dashboard
image: plugins/docker
settings:

16
Dockerfile-frontend-ui Normal file
View File

@ -0,0 +1,16 @@
FROM node:lts-alpine as nodebuild
WORKDIR /ui
RUN apk --no-cache add python2 build-base
COPY frontend/ui/ .
RUN npm install --network-timeout=100000 && \
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
npm run build
FROM scratch
COPY --from=nodebuild /ui/build/ /www/htdocs-frontend