version: "3.8" volumes: postgresql_config_data: # volume for postgresql data, used to store the geoserver config through jdbcconfig rabbitmq_data: # volume for rabbitmq data, so it doesn't create an anonymous one on each container geowebcache_data: # used by gwc and web-ui to locate the default gwc tile cache directory networks: gs-cloud-network: services: rabbitmq: image: rabbitmq:3.9-management user: 1000:1000 # set the userid:groupid the container runs as restart: unless-stopped volumes: - rabbitmq_data:/var/lib/rabbitmq networks: - gs-cloud-network deploy: resources: limits: cpus: '2.0' memory: 1G database: # be sure geoserver.backend.jdbcconfig.initdb is set to true in application.yml at lease for the first app run image: postgres:13-alpine environment: POSTGRES_DB: geoserver_config POSTGRES_USER: geoserver POSTGRES_PASSWORD: geo5erver networks: - gs-cloud-network volumes: - postgresql_config_data:/var/lib/postgresql/data deploy: resources: limits: cpus: '2.0' memory: 1G # Eureka service discovery. This is a Discovery First Bootstrap configuration. # The discovery service is the only fixed entry point. # Browse to http://localhost:8761 to check all services are registered. # Run docker-compose -f docker-compose.yml -f docker-compose-discovery-ha.yml to run extra discovery service instances for HA discovery: image: geoservercloud/geoserver-cloud-discovery:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as ports: - 8761:8761 networks: - gs-cloud-network restart: unless-stopped deploy: resources: limits: cpus: '2.0' memory: 512M # Spring Cloud Config service, provides centralized configuration to all # microservices. Being a Discovery First Bootstrap configuration, it'll # register itself with the Eureka discovery service and can be scaled config: image: geoservercloud/geoserver-cloud-config:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - discovery - rabbitmq - database environment: # Either 'git' or 'native'. Use the default sample git repository to download the services configuration from # If 'git', BEWARE config server will look for a branch called "master", and github changed the default branch name to "main" # For more information, see https://cloud.spring.io/spring-cloud-config/multi/multi__spring_cloud_config_server.html#_git_backend SPRING_PROFILES_ACTIVE: git # 'git' profile config CONFIG_GIT_URI: https://github.com/geoserver/geoserver-cloud-config.git # get the config for this release from the v1.7.1 tag SPRING_CLOUD_CONFIG_SERVER_GIT_DEFAULT_LABEL: v1.7.1 # where to store the cloned repository, if unset, it'll use /tmp/config-repo- CONFIG_GIT_BASEDIR: /tmp/git_config # 'native' profile config CONFIG_NATIVE_PATH: /tmp/config # avoid stack trace due to jgit not being able of creating a .config dir at $HOME XDG_CONFIG_HOME: /tmp networks: - gs-cloud-network # Uncoment to bind to a local filesystem directory if using the 'native' profile #volumes: # - ./config:/tmp/config deploy: resources: limits: cpus: '2.0' memory: 512M # Application facade, provides a single entry point routing to all # microservices (e.g. http://localhost:9090/geoserver/cloud/wms, http://localhost:9090/geoserver/cloud/wfs, etc) gateway: image: geoservercloud/geoserver-cloud-gateway:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - config environment: # eat our own dogfood and set a base path GEOSERVER_BASE_PATH: /geoserver/cloud ports: - 9090:8080 networks: - gs-cloud-network deploy: resources: limits: cpus: '4.0' memory: 1G # WFS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wfs=5) wfs: image: geoservercloud/geoserver-cloud-wfs:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - config environment: SPRING_PROFILES_ACTIVE: "jdbcconfig" networks: - gs-cloud-network deploy: resources: limits: cpus: '2.0' memory: 1G # WMS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wms=5) wms: image: geoservercloud/geoserver-cloud-wms:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - config environment: SPRING_PROFILES_ACTIVE: "jdbcconfig" networks: - gs-cloud-network deploy: resources: limits: cpus: '2.0' memory: 1G # WCS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wcs=5) wcs: image: geoservercloud/geoserver-cloud-wcs:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - config environment: SPRING_PROFILES_ACTIVE: "jdbcconfig" networks: - gs-cloud-network deploy: resources: limits: cpus: '2.0' memory: 1G # REST config microservice, port dynamically allocated to allow scaling (e.g docker-compose scale rest=5) rest: image: geoservercloud/geoserver-cloud-rest:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - config environment: SPRING_PROFILES_ACTIVE: "jdbcconfig" networks: - gs-cloud-network deploy: mode: replicated replicas: 1 resources: limits: cpus: '1.5' memory: 1G # WEB UI microservice webui: image: geoservercloud/geoserver-cloud-webui:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - rabbitmq environment: SPRING_PROFILES_ACTIVE: "jdbcconfig" GEOWEBCACHE_CACHE_DIR: /data/geowebcache networks: - gs-cloud-network deploy: resources: limits: cpus: '2.0' memory: 1G gwc: image: geoservercloud/geoserver-cloud-gwc:1.7.1 user: 1000:1000 # set the userid:groupid the container runs as depends_on: - config environment: SPRING_PROFILES_ACTIVE: "jdbcconfig" GEOWEBCACHE_CACHE_DIR: /data/geowebcache networks: - gs-cloud-network volumes: - geowebcache_data:/data/geowebcache deploy: resources: limits: cpus: '2.0' memory: 1G