Compare commits
13 Commits
392872c9f6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
757be0a536
|
|||
|
8ef3049563
|
|||
|
d5f4f5d213
|
|||
|
b6319fbc8a
|
|||
|
d84e659b36
|
|||
|
11314baac4
|
|||
| 5116a6051f | |||
| 9d6bb5bc79 | |||
| 1c8781f552 | |||
| 8d8fe6e76f | |||
| 8760d12497 | |||
| f3babdeb20 | |||
| 0a73d0bd83 |
15
.dockerignore
Normal file
15
.dockerignore
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
.DS_Store
|
||||||
|
|
||||||
|
fonts/LICENSE.txt
|
||||||
|
fonts/METADATA.pb
|
||||||
|
|
||||||
|
scripts
|
||||||
|
|
||||||
|
exported.png
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
|
Dockerfile*
|
||||||
|
Makefile
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
.github/
|
||||||
20
.github/workflows/docker-private.yml
vendored
Normal file
20
.github/workflows/docker-private.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Docker CI Private
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and Publish Docker Image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
|
||||||
|
steps:
|
||||||
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- 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 && /bin/bash scripts/build-arm.sh
|
||||||
28
.github/workflows/docker-public.yml
vendored
Normal file
28
.github/workflows/docker-public.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Docker CI Public
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
-
|
||||||
|
name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_SECRET }}
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
-
|
||||||
|
name: Build and Push from Makefile
|
||||||
|
run: |
|
||||||
|
make build
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
36
Dockerfile
36
Dockerfile
@@ -1,26 +1,26 @@
|
|||||||
from node:14.16.0
|
FROM node:alpine
|
||||||
LABEL maintainer="sombochea@cubetiqs.com"
|
LABEL maintainer="sombochea@cubetiqs.com"
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
chromium \
|
||||||
|
nss \
|
||||||
|
freetype \
|
||||||
|
harfbuzz \
|
||||||
|
ca-certificates \
|
||||||
|
ttf-freefont
|
||||||
|
|
||||||
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||||
|
ENV NODE_ENV production
|
||||||
ENV ACCEPT_HIGHCHARTS_LICENSE="YES"
|
ENV ACCEPT_HIGHCHARTS_LICENSE="YES"
|
||||||
RUN yarn global add highcharts-export-server
|
|
||||||
|
RUN npm i -g @cubetiq/highcharts-export-server@latest
|
||||||
|
|
||||||
WORKDIR /usr/share/fonts/truetype
|
WORKDIR /usr/share/fonts/truetype
|
||||||
ADD fonts/OpenSans-Regular.ttf OpenSans-Regular.ttf
|
ADD fonts/* ./
|
||||||
ADD fonts/OpenSans-Light.ttf OpenSans-Light.ttf
|
RUN fc-cache -fv
|
||||||
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-Bokor.ttf Kh-Bokor.ttf
|
|
||||||
ADD fonts/Kh-Content.ttf Kh-Content.ttf
|
|
||||||
ADD fonts/Kh-Siemreap.ttf Kh-Siemreap.ttf
|
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
ADD entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE ${PORT:-8080}
|
||||||
ENTRYPOINT ["highcharts-export-server", "--enableServer", "1", "--port", "8080"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
20
Dockerfile.arm
Normal file
20
Dockerfile.arm
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM --platform=linux/arm64 node:alpine
|
||||||
|
LABEL maintainer="sombochea@cubetiqs.com"
|
||||||
|
|
||||||
|
RUN apk add --no-cache chromium nss freetype harfbuzz ca-certificates ttf-freefont
|
||||||
|
|
||||||
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||||
|
ENV NODE_ENV production
|
||||||
|
ENV ACCEPT_HIGHCHARTS_LICENSE="YES"
|
||||||
|
|
||||||
|
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 ${PORT:-8080}
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
18
Makefile
Normal file
18
Makefile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
DOCKER_IMAGE=cubetiq/highcharts-export-server:latest
|
||||||
|
DOCKER_IMAGE_ARM=cubetiq/highcharts-export-server:arm
|
||||||
|
|
||||||
|
build:
|
||||||
|
@echo 'Starting docker build'
|
||||||
|
docker build . -t ${DOCKER_IMAGE}
|
||||||
|
|
||||||
|
@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 .
|
||||||
|
|
||||||
|
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
6
entrypoint.sh
Executable 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
|
||||||
BIN
fonts/KantumruyPro-Bold.ttf
Normal file
BIN
fonts/KantumruyPro-Bold.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-BoldItalic.ttf
Normal file
BIN
fonts/KantumruyPro-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-ExtraLight.ttf
Normal file
BIN
fonts/KantumruyPro-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-ExtraLightItalic.ttf
Normal file
BIN
fonts/KantumruyPro-ExtraLightItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-Italic.ttf
Normal file
BIN
fonts/KantumruyPro-Italic.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-Light.ttf
Normal file
BIN
fonts/KantumruyPro-Light.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-LightItalic.ttf
Normal file
BIN
fonts/KantumruyPro-LightItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-Medium.ttf
Normal file
BIN
fonts/KantumruyPro-Medium.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-MediumItalic.ttf
Normal file
BIN
fonts/KantumruyPro-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-Regular.ttf
Normal file
BIN
fonts/KantumruyPro-Regular.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-SemiBold.ttf
Normal file
BIN
fonts/KantumruyPro-SemiBold.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-SemiBoldItalic.ttf
Normal file
BIN
fonts/KantumruyPro-SemiBoldItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-Thin.ttf
Normal file
BIN
fonts/KantumruyPro-Thin.ttf
Normal file
Binary file not shown.
BIN
fonts/KantumruyPro-ThinItalic.ttf
Normal file
BIN
fonts/KantumruyPro-ThinItalic.ttf
Normal file
Binary file not shown.
Binary file not shown.
9
scripts/build-arm.sh
Executable file
9
scripts/build-arm.sh
Executable 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 .
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
TAG=latest
|
TAG=latest
|
||||||
REGISTRY=registry.kh.cubetiqs.com
|
REGISTRY=registry1.ctdn.net/cubetiq
|
||||||
IMAGE=highcharts-export-server
|
IMAGE=highcharts-export-server
|
||||||
CONTAINER=${REGISTRY}/${IMAGE}:${TAG}
|
CONTAINER=${REGISTRY}/${IMAGE}:${TAG}
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,7 @@ echo "Stop and remove container..."
|
|||||||
docker rm -f highcharts-export-server
|
docker rm -f highcharts-export-server
|
||||||
|
|
||||||
echo "Run the container..."
|
echo "Run the container..."
|
||||||
docker run -d --name highcharts-export-server -p 8080:8080 registry.kh.cubetiqs.com/highcharts-export-server
|
docker run --name highcharts-export-server \
|
||||||
|
-p 8080:8080 \
|
||||||
|
--restart always \
|
||||||
|
-d registry1.ctdn.net/cubetiq/highcharts-export-server
|
||||||
Reference in New Issue
Block a user