diff --git a/.drone.yml b/.drone.yml index 5539e73a..6ba90a6d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: diff --git a/Dockerfile-frontend-ui b/Dockerfile-frontend-ui new file mode 100644 index 00000000..6eb88135 --- /dev/null +++ b/Dockerfile-frontend-ui @@ -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