Skip to content

Commit

Permalink
Change standalone profile's default config location to /etc/geoserver/
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Mar 7, 2024
1 parent 538cb95 commit b57cc34
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 18 deletions.
14 changes: 7 additions & 7 deletions compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

wms:
Expand All @@ -125,7 +125,7 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

wcs:
Expand All @@ -140,7 +140,7 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

wps:
Expand All @@ -155,7 +155,7 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

gwc:
Expand All @@ -170,7 +170,7 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

rest:
Expand All @@ -185,7 +185,7 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

webui:
Expand All @@ -200,6 +200,6 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

57 changes: 50 additions & 7 deletions compose/standalone.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,102 @@
version: "3.8"

# mounts the config volume defined in geoserver.yml under /etc/geoserver/
# to work with the modified values during development instead of the ones
# embedded on the docker images
services:
discovery:
restart: no
environment:
SPRING_PROFILES_ACTIVE: "standalone"
entrypoint: echo "discovery-service disabled."

config:
restart: no
environment:
SPRING_PROFILES_ACTIVE: "standalone"
entrypoint: echo "config-service disabled."

admin:
restart: no
environment:
SPRING_PROFILES_ACTIVE: "standalone"
entrypoint: echo "admin-service disabled for standalone mode, requires discovery-service."

gateway:
environment:
SPRING_PROFILES_ACTIVE: "standalone"
depends_on:
discovery:
required: false
volumes:
- config:/etc/gscloud
- config:/etc/geoserver

wfs:
environment:
SPRING_PROFILES_ACTIVE: "${GEOSERVER_DEFAULT_PROFILES},standalone"
depends_on:
rabbitmq:
condition: service_healthy
required: true
volumes:
- config:/etc/gscloud
- config:/etc/geoserver

wms:
environment:
SPRING_PROFILES_ACTIVE: "${GEOSERVER_DEFAULT_PROFILES},standalone"
depends_on:
rabbitmq:
condition: service_healthy
required: true
volumes:
- config:/etc/gscloud
- config:/etc/geoserver

wcs:
environment:
SPRING_PROFILES_ACTIVE: "${GEOSERVER_DEFAULT_PROFILES},standalone"
depends_on:
rabbitmq:
condition: service_healthy
required: true
volumes:
- config:/etc/gscloud
- config:/etc/geoserver

wps:
environment:
SPRING_PROFILES_ACTIVE: "${GEOSERVER_DEFAULT_PROFILES},standalone"
depends_on:
rabbitmq:
condition: service_healthy
required: true
volumes:
- config:/etc/geoserver

rest:
environment:
SPRING_PROFILES_ACTIVE: "${GEOSERVER_DEFAULT_PROFILES},standalone"
depends_on:
rabbitmq:
condition: service_healthy
required: true
volumes:
- config:/etc/gscloud
- config:/etc/geoserver

webui:
environment:
SPRING_PROFILES_ACTIVE: "${GEOSERVER_DEFAULT_PROFILES},standalone"
depends_on:
rabbitmq:
condition: service_healthy
required: true
volumes:
- config:/etc/gscloud
- config:/etc/geoserver

gwc:
environment:
SPRING_PROFILES_ACTIVE: "${GEOSERVER_DEFAULT_PROFILES},standalone"
depends_on:
rabbitmq:
condition: service_healthy
required: true
volumes:
- config:/etc/gscloud
- config:/etc/geoserver
2 changes: 1 addition & 1 deletion src/apps/base-images/spring-boot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN java -Djarmode=layertools -jar application.jar extract
##########
FROM geoservercloud/gs-cloud-base-jre:$TAG

COPY target/config/ /etc/gscloud/
COPY target/config/ /etc/geoserver/

RUN mkdir -p /opt/app/bin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ eureka:
healthcheck:
enabled: false # must only be set to true in application.yml, not bootstrap
---
#no config-service, load config from /etc/gscloud if it exists
#no config-service, load config from /etc/geoserver
#all Dockerfile files have the default config under that directory
spring.config.activate.on-profile: bootstrap_standalone
spring:
#config.additional-location: optional:file:/etc/gscloud/
config.location: file:/etc/gscloud/
config.location: file:/etc/geoserver/
cloud.config:
enabled: false
---
Expand Down

0 comments on commit b57cc34

Please sign in to comment.