Skip to content

Commit

Permalink
Merge pull request #434 from groldan/docker/default_config_location
Browse files Browse the repository at this point in the history
Change standalone profile's default config location to /etc/geoserver/
  • Loading branch information
groldan authored Mar 7, 2024
2 parents 0acc7af + b57cc34 commit fba5992
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 @@ -115,7 +115,7 @@ services:
condition: service_healthy
required: true
discovery:
condition: service_healthy
condition: service_started
required: true

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

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

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

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

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

webui:
Expand All @@ -205,6 +205,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 fba5992

Please sign in to comment.