File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 tags : |
4343 ${{ env.DOCKER_REGISTRY }}/shogun-gis-client:latest
4444 load : true
45+ build-args : |
46+ APP_VERSION=latest
47+ GIT_COMMIT=${{ github.sha }}
4548
4649 - name : Build docker image (version)
4750 if : ${{ inputs.release_is_published }} == 'true'
5154 tags : |
5255 ${{ env.DOCKER_REGISTRY }}/shogun-gis-client:${{ inputs.release_version }}
5356 load : true
57+ build-args : |
58+ APP_VERSION=${{ inputs.release_version }}
59+ GIT_COMMIT=${{ github.sha }}
5460
5561 - name : Push docker image to Nexus (latest)
5662 run : |
Original file line number Diff line number Diff line change @@ -13,13 +13,26 @@ COPY . ./
1313
1414RUN npm run build
1515
16- FROM nginx:1.29.2 -alpine-slim
16+ FROM ghcr.io/ nginx/nginx-unprivileged :1.29-alpine-perl AS app
1717
18- RUN apk update && apk upgrade --no-cache
19-
20- COPY --from=build /app/build /usr/share/nginx/html
21- COPY default.conf /etc/nginx/conf.d/default.conf
18+ ENV SHOGUN_GIS_CLIENT_HOST=shogun-gis-client
2219
23- EXPOSE 80
20+ ARG GIT_COMMIT
21+ ARG APP_VERSION
2422
25- CMD ["nginx" , "-g" , "daemon off;" ]
23+ COPY --from=build /app/build /usr/share/nginx/html
24+ COPY default.conf /etc/nginx/templates/default.conf.template
25+
26+ # Metadata according to OCI Image Spec
27+ LABEL org.opencontainers.image.authors="info@terrestris.de"
28+ LABEL org.opencontainers.image.created="$(date -u +%Y-%m-%dT%H:%M:%S%z)"
29+ LABEL org.opencontainers.image.source="https://github.com/terrestris/shogun-gis-client"
30+ LABEL org.opencontainers.image.title="The SHOGun WebGIS client"
31+ LABEL org.opencontainers.image.description="Docker image for SHOGun WebGIS client"
32+ LABEL org.opencontainers.image.url=docker-public.terrestris.de/terrestris/shogun-gis-client
33+ LABEL org.opencontainers.image.vendor="terrestris GmbH & Co. KG"
34+ LABEL org.opencontainers.image.licenses="BSD-2-Clause"
35+ LABEL org.opencontainers.image.revision=$GIT_COMMIT
36+ LABEL org.opencontainers.image.version=$APP_VERSION
37+
38+ HEALTHCHECK --timeout=5s --start-period=5s --retries=3 CMD curl -f http://localhost:8080/health || exit 1
Original file line number Diff line number Diff line change 11server {
2- listen 80;
3- listen [::]:80;
4- server_name localhost;
2+ listen 8080 default_server;
3+ listen [::]:8080 default_server;
4+
5+ server_name ${SHOGUN_GIS_CLIENT_HOST};
6+
7+ # Hide nginx version
8+ server_tokens off;
9+
10+ location /health {
11+ access_log off;
12+ add_header Content-Type text/plain;
13+ return 200 "healthy\n";
14+ }
515
616 location / {
717 root /usr/share/nginx/html;
You can’t perform that action at this time.
0 commit comments