Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include default config in docker image #51

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

groldan
Copy link
Member

@groldan groldan commented Mar 7, 2024

Fixes #46

Externalized default configuration:

Include the configurable properties as a file in the Docker image under /etc/geoserver/acl-service.yml

This has some default values and makes clear which config properties should/cloud be overridden as environment variables in deployment files.

Full list of configurable properties:

These are shortenerd property names used in ${} placeholders in the embedded application.yml, and meant to be easily translated to environment variables (e.g. pg.host -> PG_HOST):

pg.host: acldb
pg.port: 5432
pg.db: acl
pg.schema: acl
pg.username: acl
pg.password: acls3cr3t
pg.pool.min: 2
pg.pool.max: 50
pg.pool.connectionTimeout: 3000
pg.pool.idleTimeout: 60000

acl.security.basic.enabled: true
acl.users.admin.enabled: true
acl.users.admin.password: "{bcrypt}$2a$10$eMyaZRLZBAZdor8nOX.qwuwOyWazXjR2hddGLCT6f6c382WiwdQGG"
acl.users.geoserver.enabled: true
acl.users.geoserver.password: "{noop}s3cr3t"
acl.security.headers.enabled: false
acl.security.headers.user-header: sec-username
acl.security.headers.roles-header: sec-roles
acl.security.headers.admin-roles: ["ROLE_ADMINISTRATOR"]

Sample docker compose.yml file:

version: "3.1"
services:
  acldb:
    image: postgis/postgis:15-3.3
    environment:
      - POSTGRES_DB=acl
      - POSTGRES_USER=acl
      - POSTGRES_PASSWORD=acls3cr3t

  acl:
    image: geoservercloud/geoserver-acl:2.0-SNAPSHOT
    environment:
      - PG_HOST=acldb
      - PG_PORT=5432
      - PG_DB=acl
      - PG_SCHEMA=acl
      - PG_USER=acl
      - PG_PASSWORD=acls3cr3t
    ports:
      - 8080:8080
      - 8081:8081

Include the configurable properties as a file in the Docker image under
`/etc/geoserver/acl-service.yml`

This has some default values and makes clear which config properties
should/cloud be overridden as environment variables in deployment files.
@groldan groldan added build docker Issues related to the docker image labels Mar 7, 2024
@groldan groldan merged commit 0bf93e5 into geoserver:main Mar 7, 2024
3 checks passed
@groldan groldan deleted the docker/include_default_config branch March 7, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build docker Issues related to the docker image
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include the default externalized configuration in the docker image
1 participant