mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
update esvue, cleanup
This commit is contained in:
@ -4,7 +4,8 @@ FROM node:20-alpine AS builder
|
||||
#
|
||||
# Prep and build Elasticvue
|
||||
RUN apk -U --no-cache add git && \
|
||||
git clone https://github.com/cars10/elasticvue -b v1.0.4 /opt/src && \
|
||||
# git clone https://github.com/cars10/elasticvue -b v1.0.4 /opt/src && \
|
||||
git clone https://github.com/t3chn0m4g3/elasticvue /opt/src && \
|
||||
# We need to adjust consts.ts so the user has connection suggestion for reverse proxied ES
|
||||
sed -i "s#export const DEFAULT_CLUSTER_URI = 'http://localhost:9200'#export const DEFAULT_CLUSTER_URI = window.location.origin + '/es'#g" /opt/src/src/consts.ts && \
|
||||
sed -i 's#href="/images/logo/favicon.ico"#href="images/logo/favicon.ico"#g' /opt/src/index.html && \
|
||||
@ -14,7 +15,8 @@ RUN apk -U --no-cache add git && \
|
||||
cp /opt/src/yarn.lock . && \
|
||||
yarn install && \
|
||||
cp -R /opt/src/* . && \
|
||||
VITE_APP_BUILD_MODE=docker VUE_APP_PUBLIC_PATH=/elasticvue/ yarn build && \
|
||||
export VITE_APP_BUILD_MODE=docker && \
|
||||
export VITE_APP_PUBLIC_PATH="/elasticvue/" && \
|
||||
yarn build && \
|
||||
cd dist && \
|
||||
tar cvfz esvue.tgz *
|
||||
|
@ -1,21 +0,0 @@
|
||||
FROM node:14.18-alpine AS builder
|
||||
#
|
||||
# Prep and build Elasticvue
|
||||
RUN apk -U --no-cache add git && \
|
||||
git clone https://github.com/cars10/elasticvue -b v0.44.0 /opt/src && \
|
||||
# We need to adjust consts.js so the user has connection suggestion for reverse proxied ES
|
||||
sed -i "s#export const DEFAULT_HOST = 'http://localhost:9200'#export const DEFAULT_HOST = window.location.origin + '/es'#g" /opt/src/src/consts.js && \
|
||||
sed -i 's#href="/images/logo/favicon.ico"#href="images/logo/favicon.ico"#g' /opt/src/public/index.html && \
|
||||
mkdir /opt/app && \
|
||||
cd /opt/app && \
|
||||
cp /opt/src/package.json . && \
|
||||
cp /opt/src/yarn.lock . && \
|
||||
yarn install --ignore-optional && \
|
||||
cp -R /opt/src/* . && \
|
||||
# We need to set this ENV so we can run Elasticvue in its own location rather than /
|
||||
VUE_APP_PUBLIC_PATH=/elasticvue/ yarn build && \
|
||||
cd dist && \
|
||||
tar cvfz esvue.tgz *
|
||||
#
|
||||
FROM scratch AS exporter
|
||||
COPY --from=builder /opt/app/dist/esvue.tgz /
|
@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
# Needs buildx to build. Run tpotce/bin/setup-builder.sh first
|
||||
echo "do not build!"
|
||||
exit 0
|
||||
docker buildx build --no-cache --progress plain --output ../../dist/html/esvue/ .
|
||||
|
Reference in New Issue
Block a user