Skip to content

Commit

Permalink
Add pg_cron extension in the tiler db
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Feb 7, 2025
1 parent 38472a3 commit 4e28d2a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 32 deletions.
2 changes: 1 addition & 1 deletion images/tiler-db/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
RUN mkdir -p /docker-entrypoint-initdb.d

COPY ./scripts/update_db.sh /docker-entrypoint-initdb.d/
COPY ./scripts/update_postgresql.sh /docker-entrypoint-initdb.d/
# COPY ./scripts/update_postgresql.sh /docker-entrypoint-initdb.d/
WORKDIR /usr/local/datefunctions
RUN git clone https://github.com/OpenHistoricalMap/DateFunctions-plpgsql.git .

Expand Down
3 changes: 2 additions & 1 deletion images/tiler-db/scripts/update_db.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/sh
set -e

# Add hstore into the DB
# Add hstore and pg_cron into the DB
for DB in template_postgis "$POSTGRES_DB" "${@}"; do
echo "Updating extensions '$DB'"
psql --dbname="$DB" -c "
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS pg_cron;
"
done
26 changes: 0 additions & 26 deletions images/tiler-db/scripts/update_postgresql.sh

This file was deleted.

4 changes: 2 additions & 2 deletions images/tiler-imposm/scripts/natural_earth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ psql "dbname='postgres' host='$DB_HOST' port='$DB_PORT' user='$DB_USER' password
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_geography_marine_polys.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_geography_regions_polys.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_rivers_lake_centerlines.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_lakes.zip"
"https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_lakes.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_glaciated_areas.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_land.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_110m_ocean.zip"
Expand All @@ -75,7 +75,7 @@ psql "dbname='postgres' host='$DB_HOST' port='$DB_PORT' user='$DB_USER' password
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_admin_0_boundary_lines_maritime_indicator.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_admin_0_countries.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_admin_0_map_subunits.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_admin_1_states_provinces_lakes.zip"
"https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_admin_1_states_provinces_lakes.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_admin_1_states_provinces_lines.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_populated_places.zip"
# "https://osmseed-staging.s3.amazonaws.com/naciscdn/ne_50m_geographic_lines.zip"
Expand Down
4 changes: 2 additions & 2 deletions values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ osm-seed:
mountPath: /var/lib/postgresql/data
subPath: postgresql-d
# In case cloudProvider: aws
AWS_ElasticBlockStore_volumeID : vol-045cab2cfc3b5154d
AWS_ElasticBlockStore_volumeID : vol-0d054a1e92fe69168
AWS_ElasticBlockStore_size: 100Gi
resources:
enabled: false
Expand Down Expand Up @@ -503,7 +503,7 @@ osm-seed:
accessMode: ReadWriteOnce
mountPath: /mnt/data
# In case cloudProvider: aws
AWS_ElasticBlockStore_volumeID: vol-05b4435bac8bb37b4
AWS_ElasticBlockStore_volumeID: vol-09f7acdae9e9f45a0
AWS_ElasticBlockStore_size: 50Gi
resources:
enabled: false
Expand Down

0 comments on commit 4e28d2a

Please # to comment.