Add highcharts latest version and add more fonts

This commit is contained in:
Sambo Chea 2023-12-13 12:12:28 +07:00
parent 5116a6051f
commit 11314baac4
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
23 changed files with 39 additions and 23 deletions

View File

@ -1,6 +1,5 @@
.DS_Store
fonts/Kh-Bokor.ttf
fonts/LICENSE.txt
fonts/METADATA.pb
@ -9,5 +8,8 @@ scripts
exported.png
LICENSE
README.md
Dockerfile*
Makefile
.gitignore
.github
.github/

View File

@ -3,7 +3,7 @@ name: Docker CI Private
on:
push:
branches:
- master
- main
jobs:
build:
@ -16,4 +16,4 @@ jobs:
- name: Sign-in to Private Registry "${REGISTRY}"
run: docker login $REGISTRY -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Building Docker Image
run: /bin/bash scripts/build.sh
run: /bin/bash scripts/build.sh scripts/build-arm.sh

View File

@ -3,7 +3,7 @@ name: Docker CI Public
on:
push:
branches:
- 'master'
- 'main'
jobs:
docker:

View File

@ -1,23 +1,11 @@
FROM node:14.16.0
FROM node:alpine
LABEL maintainer="sombochea@cubetiqs.com"
ENV ACCEPT_HIGHCHARTS_LICENSE="YES"
RUN yarn global add highcharts-export-server
RUN npm i -g highcharts-export-server@latest
WORKDIR /usr/share/fonts/truetype
ADD fonts/OpenSans-Regular.ttf OpenSans-Regular.ttf
ADD fonts/OpenSans-Light.ttf OpenSans-Light.ttf
ADD fonts/OpenSans-Semibold.ttf OpenSans-Semibold.ttf
ADD fonts/OpenSans-Bold.ttf OpenSans-Bold.ttf
ADD fonts/OpenSans-ExtraBold.ttf OpenSans-ExtraBold.ttf
ADD fonts/OpenSans-Italic.ttf OpenSans-Italic.ttf
ADD fonts/OpenSans-LightItalic.ttf OpenSans-LightItalic.ttf
ADD fonts/OpenSans-BoldItalic.ttf OpenSans-BoldItalic.ttf
ADD fonts/OpenSans-SemiboldItalic.ttf OpenSans-SemiboldItalic.ttf
ADD fonts/OpenSans-ExtraBoldItalic.ttf OpenSans-ExtraBoldItalic.ttf
ADD fonts/Kh-Content.ttf Kh-Content.ttf
ADD fonts/Kh-Siemreap.ttf Kh-Siemreap.ttf
ADD fonts/* ./
WORKDIR /

13
Dockerfile.arm Normal file
View File

@ -0,0 +1,13 @@
FROM --platform=linux/arm64 node:alpine
LABEL maintainer="sombochea@cubetiqs.com"
ENV ACCEPT_HIGHCHARTS_LICENSE="YES"
RUN npm i -g highcharts-export-server@latest
WORKDIR /usr/share/fonts/truetype
ADD fonts/* ./
WORKDIR /
EXPOSE 8080
ENTRYPOINT ["highcharts-export-server", "--enableServer", "1", "--port", "8080"]

View File

@ -1,4 +1,5 @@
DOCKER_IMAGE=cubetiq/highcharts-export-server
DOCKER_IMAGE=cubetiq/highcharts-export-server:latest
DOCKER_IMAGE_ARM=cubetiq/highcharts-export-server:arm
build:
@echo 'Starting docker build'
@ -7,4 +8,7 @@ build:
@echo 'Starting docker push'
docker push ${DOCKER_IMAGE}
@echo 'Starting docker buildx push'
docker buildx build --platform linux/arm64,linux/arm/v7 -f Dockerfile.arm -t ${DOCKER_IMAGE_ARM} --push .
.PHONY:build

BIN
fonts/KantumruyPro-Bold.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/KantumruyPro-Thin.ttf Normal file

Binary file not shown.

Binary file not shown.

9
scripts/build-arm.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
TAG=arm
REGISTRY=registry1.ctdn.net/cubetiq
IMAGE=highcharts-export-server
CONTAINER=${REGISTRY}/${IMAGE}:${TAG}
echo "Building container image with ${CONTAINER} for arm platform"
docker buildx build --platform linux/arm64 -f Dockerfile.arm -t ${CONTAINER} --push .

View File

@ -1,7 +1,7 @@
#!/bin/bash
TAG=latest
REGISTRY=registry.kh.cubetiqs.com
REGISTRY=registry1.ctdn.net/cubetiq
IMAGE=highcharts-export-server
CONTAINER=${REGISTRY}/${IMAGE}:${TAG}

View File

@ -7,4 +7,4 @@ echo "Run the container..."
docker run --name highcharts-export-server \
-p 8080:8080 \
--restart always \
-d registry.kh.cubetiqs.com/highcharts-export-server
-d registry1.ctdn.net/cubetiq/highcharts-export-server