Skip to content

Commit

Permalink
Use tiler-db that host in hetzner - staging
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Jan 24, 2025
1 parent 9a70029 commit e8089e5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
10 changes: 10 additions & 0 deletions hetzner/config/postgresql.config
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ log_min_duration_statement = 20000 # Log queries that take longer than 20
log_statement = 'none' # Disable logging of all statements
log_duration = off # Disable duration logging for all queries


#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------

statement_timeout = 60000 # Terminate queries running longer than 60 seconds (in milliseconds)
lock_timeout = 60000 # Timeout for acquiring locks (in milliseconds)
idle_in_transaction_session_timeout = 60000 # Close idle transactions after 60 seconds (in milliseconds)


#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------
Expand Down
8 changes: 3 additions & 5 deletions images/tiler-server/config/config.template.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[webserver]
port = ":${TILER_SERVER_PORT}"
version = "v0.20.0"

[webserver.headers]
Access-Control-Allow-Origin = "*"

Expand All @@ -27,7 +25,7 @@ type = "prometheus"
name = "osm"
type = "mvt_postgis"
uri = "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
max_connections = 100
max_connections = 150
###### PROVIDERS

####################################
Expand All @@ -37,7 +35,7 @@ max_connections = 100
name = "osm_land"
type = "mvt_postgis"
uri = "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
max_connections = 50
max_connections = 25
###### PROVIDERS
[[providers.layers]]
name = "land_0-2"
Expand Down Expand Up @@ -96,7 +94,7 @@ max_connections = 50
name = "ne"
type = "mvt_postgis"
uri = "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
max_connections = 50
max_connections = 25
###### Water lands ne
[[providers.layers]]
name = "ne_water_lakes_0-2"
Expand Down
2 changes: 1 addition & 1 deletion images/tiler-server/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ while [ "$flag" = true ]; do
fi

# Start Tegola server
TEGOLA_SQL_DEBUG=LAYER_SQL:EXECUTE_SQL tegola serve --config=/opt/tegola_config/config.toml
tegola serve --config=/opt/tegola_config/config.toml
done
6 changes: 3 additions & 3 deletions values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ osm-seed:
tilerDb:
enabled: true
useExternalHost: # When we are using useExternalHost.enabled= true other variables are giong to be disable ans use the external host config
enabled: false
enabled: true
env:
POSTGRES_HOST: {{STAGING_TILER_DB_HOST}}
POSTGRES_DB: tiler_osm_staging # Kuberntes existing db called, tiler-osm
POSTGRES_DB: tiler_osm_production # Kuberntes existing db called, tiler-osm
POSTGRES_USER: postgres
POSTGRES_PASSWORD: {{STAGING_TILER_DB_PASSWORD}}
POSTGRES_PORT: 5432
Expand Down Expand Up @@ -487,7 +487,7 @@ osm-seed:
# ====================================================================================================

tilerImposm:
enabled: true
enabled: false
env:
TILER_IMPORT_FROM: osm
TILER_IMPORT_PBF_URL: https://s3.amazonaws.com/planet.openhistoricalmap.org/planet/planet-250117_0002.osm.pbf
Expand Down

0 comments on commit e8089e5

Please # to comment.