Skip to content

Commit 6dd9b8a

Browse files
committed
Merge branch '52n-4.3.x' into 52n-4.4.x
2 parents f051115 + ebab212 commit 6dd9b8a

File tree

14 files changed

+215
-13
lines changed

14 files changed

+215
-13
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "[52n-4.4.x -> 4.4.x] Builds GeoNode Docker Images"
2+
3+
concurrency:
4+
group: "geonode_build_master"
5+
cancel-in-progress: true
6+
7+
env:
8+
TITLE: "52°North GeoNode Docker Image"
9+
VENDOR: "52°North GmbH"
10+
AUTHORS: "https://52North.org/"
11+
DESCRIPTION: "Builds and publishes the Docker images GeoNode, GeoServer, Nginx"
12+
LICENSE: "GPL-3.0"
13+
TAG: 4.4.x
14+
15+
on:
16+
push:
17+
branches:
18+
- "52n-4.4.x"
19+
20+
jobs:
21+
build_and_push_geonode:
22+
runs-on: ubuntu-22.04
23+
env:
24+
IMAGE: 52north/geonode
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
- name: Extract metadata (tags, labels) for Docker
31+
id: meta
32+
uses: docker/metadata-action@v4
33+
with:
34+
images: ${{ env.IMAGE }}
35+
labels: |
36+
"org.opencontainers.image.authors=${{ env.AUTHORS }}"
37+
"org.opencontainers.image.vendor=${{ env.VENDOR }}"
38+
"org.opencontainers.image.description=${{ env.DESCRIPTION }}"
39+
"org.opencontainers.image.title=${{ env.TITLE }}"
40+
"org.opencontainers.image.licenses=${{ env.LICENSE }}"
41+
tags: |
42+
latest
43+
${{ env.TAG }}
44+
45+
- name: Login to Docker Hub
46+
uses: docker/login-action@v2
47+
with:
48+
username: ${{ secrets.DOCKERHUB_USERNAME }}
49+
password: ${{ secrets.DOCKERHUB_TOKEN_52N_MASTER }}
50+
- name: Build and push
51+
uses: docker/build-push-action@v4
52+
with:
53+
context: .
54+
file: ./Dockerfile
55+
push: true
56+
tags: ${{ steps.meta.outputs.tags }}
57+
labels: ${{ steps.meta.outputs.labels }}
58+
cache-from: type=registry,ref=${{ env.IMAGE }}:buildcache
59+
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache,mode=max

.github/workflows/52n-release.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Release GeoNode Docker Images
2+
3+
concurrency:
4+
group: "geonode_build_release"
5+
cancel-in-progress: true
6+
7+
env:
8+
TITLE: "52°North GeoNode Docker Image"
9+
VENDOR: "52°North GmbH"
10+
AUTHORS: "https://52North.org/"
11+
DESCRIPTION: "Builds and publishes the Docker images GeoNode, GeoServer, Nginx"
12+
LICENSE: "GPL-3.0"
13+
14+
on:
15+
push:
16+
tags:
17+
- "*-52n"
18+
19+
jobs:
20+
build_and_push_geonode:
21+
runs-on: ubuntu-22.04
22+
env:
23+
IMAGE: 52north/geonode
24+
steps:
25+
-
26+
name: Checkout
27+
uses: actions/checkout@v3
28+
-
29+
name: Parse semver string
30+
id: semver_parser
31+
uses: booxmedialtd/ws-action-parse-semver@v1
32+
with:
33+
input_string: "${{github.ref_name}}"
34+
version_extractor_regex: '(.*)-52n'
35+
-
36+
name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v2
38+
-
39+
name: Extract metadata (tags, labels) for Docker
40+
id: meta
41+
uses: docker/metadata-action@v4
42+
env:
43+
MAJOR_VERSION: ${{ steps.semver_parser.outputs.major }}
44+
MAJOR_MINOR_VERSION: ${{ steps.semver_parser.outputs.major }}.${{ steps.semver_parser.outputs.minor }}
45+
MAJOR_MINOR_PATCH_VERSION: ${{ steps.semver_parser.outputs.fullversion }}
46+
with:
47+
images: ${{ env.IMAGE }}
48+
labels: |
49+
"org.opencontainers.image.authors=${{ env.AUTHORS }}"
50+
"org.opencontainers.image.vendor=${{ env.VENDOR }}"
51+
"org.opencontainers.image.description=${{ env.DESCRIPTION }}"
52+
"org.opencontainers.image.title=${{ env.TITLE }}"
53+
"org.opencontainers.image.licenses=${{ env.LICENSE }}"
54+
tags: |
55+
latest
56+
${{ env.MAJOR_VERSION }}
57+
${{ env.MAJOR_MINOR_VERSION }}
58+
${{ env.MAJOR_MINOR_PATCH_VERSION }}
59+
-
60+
name: Login to Docker Hub
61+
uses: docker/login-action@v2
62+
with:
63+
username: ${{ secrets.DOCKERHUB_USERNAME }}
64+
password: ${{ secrets.DOCKERHUB_TOKEN_52N_MASTER }}
65+
-
66+
name: Fail in case fully tagged version already exists
67+
run: |
68+
if docker manifest inspect ${{ env.IMAGE }}:${{ steps.semver_parser.outputs.fullversion }}; then
69+
echo "tag version already exists! Will not override."
70+
exit 1
71+
fi
72+
-
73+
name: Build and push
74+
if: ${{ !github.event.act }} # skip during local actions testing
75+
uses: docker/build-push-action@v4
76+
with:
77+
context: .
78+
file: ./Dockerfile
79+
push: true
80+
tags: ${{ steps.meta.outputs.tags }}
81+
labels: ${{ steps.meta.outputs.labels }}
82+
cache-from: type=registry,ref=${{ env.IMAGE }}:buildcache
83+
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache,mode=max
84+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Update Docker Hub Description
2+
on:
3+
push:
4+
branches:
5+
- 52n-master
6+
paths:
7+
- README_52n.md
8+
- .github/workflows/dockerhub-description.yml
9+
jobs:
10+
dockerHubDescription:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Docker Hub Description
16+
uses: peter-evans/dockerhub-description@v3
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_TOKEN_52N_MASTER }}
20+
repository: 52north/geonode
21+
short-description: "Geospatial content management system"
22+
readme-filepath: ./README_52n.md
23+
enable-url-completion: true

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ scripts/spcgeonode/_volume_*
9797
!hooks/*
9898

9999
.env
100-
100+
.secret

README_52n.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# 52°North Fork of GeoNode
2+
3+
This image is built from a fork of [Geonode](https://github.com/geonode/geonode).
4+
[52°North GmbH](https://52north.org) maintains an own fork of GeoNode in order to make necessary adjustments within projects which are not part of GeoNode core.
5+
6+
However, we are interested to stay as close to upstream as possible, to benefit from ongoing development, but also to contribute features and fixes we develop in our projects.
7+
8+
9+
Starting from version `4` this image is built from branch `52n-<geonode-branchname>` of the [`52north/geonode` repository](https://github.com/52North/geonode/tree/52n-master).
10+
Please note, that GeoNode depends on other components which are also available as Docker images.
11+
These images, however, are maintained, built and published from a [`52north/geonode-docker` repository](https://github.com/52North/geonode-docker).
12+
13+
> :bulb: **Note:**
14+
>
15+
> Please note that the versioning schema is different from the upstream project.
16+
> All images are released and tagged using the GeoNode version.
17+
18+
19+
You can obtain all images from here:
20+
21+
* [`52north/geonode`](https://hub.docker.com/r/52north/geonode) (this image)
22+
* [`52north/geonode-geoserver`](https://hub.docker.com/r/52north/geonode-geoserver)
23+
* [`52north/geonode-geoserver_data`](https://hub.docker.com/r/52north/geonode-geoserver_data)
24+
* [`52north/geonode-nginx`](https://hub.docker.com/r/52north/geonode-nginx)
25+
* [`52north/geonode-postgis`](https://hub.docker.com/r/52north/geonode-postgis)
26+
27+
The Dockerfiles can be found under the [`./scripts/docker` folder](https://github.com/52North/geonode/tree/52n-master/scripts/docker).
28+
29+
The GeoNode Dockerfile can be found under the [`./scripts/docker` folder](https://github.com/52North/geonode/tree/52n-master/scripts/docker).
30+
The Dockerfiles for the dependent components are available at [the geonode-docker repository](https://github.com/52North/geonode-docker).
31+
32+
33+
Depending on our current project contexts we merge regularly from upstream, and create new pull requests based on this fork.
34+
35+
> **Note on version `3` tags**
36+
>
37+
> Images containing a `3.x` version tag were experimental and do have a different code base.
38+
> These image are considered to be removed in the near future.

create-envfile.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ def _get_vals_to_replace(args):
9292
_vals_to_replace["letsencrypt_mode"] = (
9393
"disabled"
9494
if not _vals_to_replace.get("https_host")
95-
else "staging"
96-
if _jsfile.get("env_type", args.env_type) in ["test"]
97-
else "production"
95+
else "staging" if _jsfile.get("env_type", args.env_type) in ["test"] else "production"
9896
)
9997
_vals_to_replace["debug"] = False if _jsfile.get("env_type", args.env_type) in ["prod", "test"] else True
10098
_vals_to_replace["email"] = _jsfile.get("email", args.email)

docker-compose-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3.9'
33
# Common Django template for GeoNode and Celery services below
44
x-common-django:
55
&default-common-django
6-
image: geonode/geonode:local
6+
image: 52north/geonode:local
77
build:
88
context: ./
99
dockerfile: Dockerfile

docker-compose-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3.9'
33
# Common Django template for GeoNode and Celery services below
44
x-common-django:
55
&default-common-django
6-
image: geonode/geonode:latest-ubuntu-22.04
6+
image: 52north/geonode:local
77
build:
88
context: ./
99
dockerfile: Dockerfile

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3.9'
33
# Common Django template for GeoNode and Celery services below
44
x-common-django:
55
&default-common-django
6-
image: geonode/geonode:latest-ubuntu-22.04
6+
image: 52north/geonode:4.4.x
77
build:
88
context: ./
99
dockerfile: Dockerfile

geonode/proxy/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,4 @@ def test_should_return_true_if_files_are_available(self, fexists):
419419
self.assertTrue(actual)
420420

421421
link.delete()
422-
asset.delete()
422+
asset.delete()

0 commit comments

Comments
 (0)