Skip to content

Commit 6d4ab40

Browse files
authored
Test light version in ct workflow - fix sqlite build in light (#1477)
* Test light version in ct workflow * make light builder two part
1 parent 5441a10 commit 6d4ab40

File tree

6 files changed

+66
-46
lines changed

6 files changed

+66
-46
lines changed

.github/workflows/ct.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ jobs:
6565
context: .
6666
push: false
6767
platforms: linux/arm64,linux/amd64
68-
# experimental: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api
68+
cache-from: type=gha
69+
cache-to: type=gha,mode=max
70+
71+
- name: Create Tileserver Light Directory
72+
run: node publish.js --no-publish
73+
74+
- name: Install node dependencies
75+
run: npm ci --prefer-offline --no-audit
76+
working-directory: ./light
77+
78+
- name: Test Light Version to Docker Hub
79+
uses: docker/build-push-action@v6
80+
with:
81+
context: ./light
82+
file: ./light/Dockerfile
83+
push: false
84+
platforms: linux/arm64,linux/amd64
6985
cache-from: type=gha
7086
cache-to: type=gha,mode=max

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# tileserver-gl changelog
22

3-
## 5.2.0-pre.1
3+
## 5.2.0-pre.2
44
* Use npm packages for public/resources (https://github.com/maptiler/tileserver-gl/pull/1427) by @okimiko
55
* use ttf files of googlefonts/opensans (https://github.com/maptiler/tileserver-gl/pull/1447) by @okimiko
66
* Limit Elevation Lat/Long Output Length (https://github.com/maptiler/tileserver-gl/pull/1457) by @okimiko
77
* Fetch style from url (https://github.com/maptiler/tileserver-gl/pull/1462) by @YoelRidgway
88
* fix: memory leak on SIGHUP (https://github.com/maptiler/tileserver-gl/pull/1455) by @okimiko
9-
* fix: resolves Unimplemented type: 3 error for geojson format #1465
9+
* fix: resolves Unimplemented type: 3 error for geojson format (https://github.com/maptiler/tileserver-gl/pull/1465) by @rjdjohnston
10+
* fix: Test light version in ct workflow - fix sqlite build in light (https://github.com/maptiler/tileserver-gl/pull/2034) by @acalcutt
1011

1112
## 5.1.3
1213
* Fix SIGHUP (broken since 5.1.x) (https://github.com/maptiler/tileserver-gl/pull/1452) by @okimiko

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ RUN npm config set maxsockets 1 && \
5050
npm config set fetch-retries 5 && \
5151
npm config set fetch-retry-mintimeout 100000 && \
5252
npm config set fetch-retry-maxtimeout 600000 && \
53-
npm install -g copyfiles@2.4.1 && \
5453
npm ci --omit=dev && \
5554
chown -R root:root /usr/src/app
5655

Dockerfile_light

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
1-
FROM ubuntu:jammy
1+
FROM ubuntu:jammy AS builder
2+
3+
ENV NODE_ENV="production"
4+
5+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
6+
7+
RUN export DEBIAN_FRONTEND=noninteractive && \
8+
apt-get update && \
9+
apt-get install -y --no-install-recommends --no-install-suggests \
10+
build-essential \
11+
ca-certificates \
12+
curl \
13+
gnupg && \
14+
mkdir -p /etc/apt/keyrings && \
15+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
16+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
17+
apt-get -qq update && \
18+
apt-get install -y --no-install-recommends --no-install-suggests nodejs && \
19+
npm i -g npm@latest && \
20+
apt-get -y remove curl gnupg && \
21+
apt-get -y --purge autoremove && \
22+
apt-get clean && \
23+
rm -rf /var/lib/apt/lists/*
24+
25+
RUN mkdir -p /usr/src/app
26+
27+
WORKDIR /usr/src/app
28+
29+
COPY package.json /usr/src/app
30+
COPY package-lock.json /usr/src/app
31+
32+
RUN npm config set maxsockets 1 && \
33+
npm config set fetch-retries 5 && \
34+
npm config set fetch-retry-mintimeout 100000 && \
35+
npm config set fetch-retry-maxtimeout 600000 && \
36+
npm ci --omit=dev && \
37+
chown -R root:root /usr/src/app
38+
39+
FROM ubuntu:jammy AS final
240

341
ENV \
442
NODE_ENV="production" \
@@ -26,16 +64,9 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
2664
apt-get clean && \
2765
rm -rf /var/lib/apt/lists/*
2866

29-
WORKDIR /usr/src/app
30-
COPY . .
67+
COPY --from=builder /usr/src/app /usr/src/app
3168

32-
RUN npm config set maxsockets 1 && \
33-
npm config set fetch-retries 5 && \
34-
npm config set fetch-retry-mintimeout 100000 && \
35-
npm config set fetch-retry-maxtimeout 600000 && \
36-
npm install --omit=dev && \
37-
chown -R root:root . && \
38-
chmod +x ./docker-entrypoint.sh
69+
COPY . /usr/src/app
3970

4071
RUN mkdir -p /data && chown node:node /data
4172
VOLUME /data

package-lock.json

Lines changed: 3 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tileserver-gl",
3-
"version": "5.2.0-pre.1",
3+
"version": "5.2.0-pre.2",
44
"description": "Map tile server for JSON GL styles - vector and server side generated raster tiles",
55
"main": "src/main.js",
66
"bin": "src/main.js",
@@ -41,6 +41,7 @@
4141
"clone": "2.1.2",
4242
"color": "4.2.3",
4343
"commander": "12.1.0",
44+
"copyfiles": "2.4.1",
4445
"cors": "2.8.5",
4546
"express": "5.0.1",
4647
"handlebars": "4.7.8",
@@ -63,7 +64,6 @@
6364
"@typescript-eslint/eslint-plugin": "^7.18.0",
6465
"@typescript-eslint/parser": "^7.18.0",
6566
"chai": "5.1.1",
66-
"copyfiles": "2.4.1",
6767
"eslint": "^8.57.0",
6868
"eslint-config-prettier": "^9.1.0",
6969
"eslint-plugin-jsdoc": "^50.2.2",

0 commit comments

Comments
 (0)