Add support for config ui

This commit is contained in:
Sambo Chea 2023-12-13 19:23:22 +07:00
parent d5f4f5d213
commit 8ef3049563
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
4 changed files with 18 additions and 6 deletions

View File

@ -13,13 +13,14 @@ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV NODE_ENV production
ENV ACCEPT_HIGHCHARTS_LICENSE="YES"
RUN npm i -g highcharts-export-server@latest
RUN npm i -g @cubetiq/highcharts-export-server@latest
WORKDIR /usr/share/fonts/truetype
ADD fonts/* ./
RUN fc-cache -fv
WORKDIR /
ADD entrypoint.sh /entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["highcharts-export-server", "--enableServer", "1", "--port", "8080"]
EXPOSE ${PORT:-8080}
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -7,13 +7,14 @@ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV NODE_ENV production
ENV ACCEPT_HIGHCHARTS_LICENSE="YES"
RUN npm i -g highcharts-export-server@latest
RUN npm i -g @cubetiq/highcharts-export-server@latest
WORKDIR /usr/share/fonts/truetype
ADD fonts/* ./
RUN fc-cache -fv
WORKDIR /
ADD entrypoint.sh /entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["highcharts-export-server", "--enableServer", "1", "--port", "8080"]
EXPOSE ${PORT:-8080}
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -11,4 +11,8 @@ build:
@echo 'Starting docker buildx push'
docker buildx build --platform linux/arm64,linux/arm/v7 -f Dockerfile.arm -t ${DOCKER_IMAGE_ARM} --push .
run-test:
@echo 'Starting docker run'
docker run --rm -e PORT=5000 -e HIGHCHARTS_NO_LOGO=true -e HIGHCHARTS_UI_ENABLE=true -e HIGHCHARTS_UI_ROUTE=/ui --name hc-server -p 8080:5000 ${DOCKER_IMAGE}
.PHONY:build

6
entrypoint.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
PORT=${PORT:-8080}
HIGHCHARTS_LOG_LEVEL=${HIGHCHARTS_LOG_LEVEL:-1}
highcharts-export-server --enableServer 1 --port $PORT --logLevel $HIGHCHARTS_LOG_LEVEL