Skip to content

Commit

Permalink
improvements for the development docker composition
Browse files Browse the repository at this point in the history
* use a postgis docker image with arm64 support
* add shell scripts for to run docker compose with the different catalog backends
  • Loading branch information
groldan committed Sep 27, 2024
1 parent 229374f commit df171dc
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 57 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,13 @@ initializes a volume with the default GeoServer release data directory.
Run with:

```bash
$ alias dcd="docker compose -f compose.yml -f catalog-datadir.yml"
$ dcd up -d
$ docker compose -f compose.yml -f catalog-datadir.yml
```

or the more convenient shell script:

```bash
$ ./datadir up -d
```

#### PostgreSQL Catalog back-end
Expand All @@ -233,8 +238,13 @@ and not part of the GeoServer Cloud deployment.
Run with:

```bash
$ alias dcp="docker compose -f compose.yml -f catalog-pgconfig.yml"
$ dcp up -d
$ docker compose -f compose.yml -f catalog-pgconfig.yml
```

Or the more convenient shell script:

```
$ ./pgconfig up -d
```

**PGBouncer**:
Expand Down
1 change: 0 additions & 1 deletion compose/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose default environment variable values
COMPOSE_PROJECT_NAME=gscloud_dev
TAG=1.9-SNAPSHOT
ACL_TAG=2.3.0
GS_USER="1000:1000"
Expand Down
2 changes: 2 additions & 0 deletions compose/catalog-datadir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Note the default data directory location is /opt/app/data_directory
# To set it to a different path, change the mount point and add the following env variable: GEOSERVER_DATA_DIR: </path/to/data_directory>

name: gscloud_dev_datadir

volumes:
datadir:
driver_opts:
Expand Down
2 changes: 2 additions & 0 deletions compose/catalog-jdbcconfig.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: gscloud_dev_jdbcconfig

volumes:
jdbcconfig_data: # volume for postgresql data, used to store the geoserver config through jdbcconfig

Expand Down
2 changes: 2 additions & 0 deletions compose/catalog-pgconfig.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: gscloud_dev_pgconfig

volumes:
pgconfigdb_data: # volume for postgresql data, used to store the geoserver config through pgconfig backend

Expand Down
74 changes: 23 additions & 51 deletions compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@ volumes:
type: none
o: bind
device: $PWD/../config


x-gs-dependencies: &gs-dependencies
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_healthy
required: true
acl:
condition: service_healthy
required: true
postgis:
condition: service_started
required: true

services:

acl:
Expand All @@ -32,7 +46,7 @@ services:
#- SPRING_PROFILES_ACTIVE=logging_debug,logging_debug_events
depends_on:
acldb:
condition: service_healthy
condition: service_started
required: true
rabbitmq:
condition: service_healthy
Expand Down Expand Up @@ -120,13 +134,7 @@ services:
image: geoservercloud/geoserver-cloud-wfs:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WFS}"
depends_on:
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_started
required: true
depends_on: *gs-dependencies

wms:
image: geoservercloud/geoserver-cloud-wms:${TAG}
Expand All @@ -135,13 +143,7 @@ services:
service: gstemplate
environment:
JAVA_OPTS: "${JAVA_OPTS_WMS}"
depends_on:
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_started
required: true
depends_on: *gs-dependencies

wcs:
extends:
Expand All @@ -150,13 +152,7 @@ services:
image: geoservercloud/geoserver-cloud-wcs:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WCS}"
depends_on:
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_started
required: true
depends_on: *gs-dependencies

wps:
extends:
Expand All @@ -165,13 +161,7 @@ services:
image: geoservercloud/geoserver-cloud-wps:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WPS}"
depends_on:
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_started
required: true
depends_on: *gs-dependencies

gwc:
extends:
Expand All @@ -180,13 +170,7 @@ services:
image: geoservercloud/geoserver-cloud-gwc:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_GWC}"
depends_on:
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_started
required: true
depends_on: *gs-dependencies

rest:
extends:
Expand All @@ -195,13 +179,7 @@ services:
image: geoservercloud/geoserver-cloud-rest:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_REST}"
depends_on:
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_started
required: true
depends_on: *gs-dependencies

webui:
extends:
Expand All @@ -210,11 +188,5 @@ services:
image: geoservercloud/geoserver-cloud-webui:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WEBUI}"
depends_on:
rabbitmq:
condition: service_healthy
required: true
discovery:
condition: service_started
required: true
depends_on: *gs-dependencies

3 changes: 3 additions & 0 deletions compose/datadir
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/bin/sh

docker compose -f compose.yml -f catalog-datadir.yml $@
3 changes: 3 additions & 0 deletions compose/jdbcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/bin/sh

docker compose -f compose.yml -f catalog-jdbcconfig.yml $@
3 changes: 3 additions & 0 deletions compose/pgconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#/bin/sh

docker compose -f compose.yml -f catalog-pgconfig.yml $@
4 changes: 3 additions & 1 deletion compose/templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ services:
postgistemplate:
extends:
service: postgrestemplate
image: postgis/postgis:latest
#image: postgis/postgis:latest
#image with arm/64 support:
image: imresamu/postgis:15-3.4
environment:
POSTGRES_DB: postgis
POSTGRES_USER: postgis
Expand Down

0 comments on commit df171dc

Please sign in to comment.