Skip to content

Commit

Permalink
Merge pull request #291 from OpenHistoricalMap/api-db/update
Browse files Browse the repository at this point in the history
DB upgrade to Postgres 14
  • Loading branch information
Rub21 authored Apr 18, 2024
2 parents ae976d2 + 6410929 commit 5433db0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
10 changes: 5 additions & 5 deletions compose/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
volumes:
- ./data/db-data:/var/lib/postgresql/data
env_file:
- ./.env.web
- ./../envs/.env.web
web:
image: osmseed-web:v1
build:
Expand All @@ -20,7 +20,7 @@ services:
ports:
- '80:80'
env_file:
- ./.env.web
####### Enable for development mode
# volumes:
# - ./../../ohm-website:/var/www
- ./../envs/.env.web
####### Enable for development mode
# volumes:
# - ./../../ohm-website:/var/www
17 changes: 6 additions & 11 deletions images/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM postgres:11
RUN rm /etc/apt/sources.list.d/pgdg.list
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list
RUN apt-get update && apt-get -y install apt-transport-https
RUN echo "deb [ signed-by=/usr/local/share/keyrings/postgres.gpg.asc ] https://apt-archive.postgresql.org/pub/repos/apt/ stretch-pgdg main 11" >/etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y \
postgresql-server-dev-11 \
FROM postgres:14
RUN apt-get update \
&& apt-get install -y \
postgresql-server-dev-14 \
make \
build-essential \
postgresql-11-postgis-2.5 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
postgresql-14-postgis-3 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

ADD functions/functions.sql /usr/local/share/osm-db-functions.sql
ADD docker_postgres.sh /docker-entrypoint-initdb.d/
Expand Down
2 changes: 1 addition & 1 deletion values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ osm-seed:
mountPath: /var/lib/postgresql/data
subPath: postgresql-db
# In case cloudProvider: aws
AWS_ElasticBlockStore_volumeID : {{STAGING_DB_EBS}}
AWS_ElasticBlockStore_volumeID : vol-08e9a73c3c0f2855c
AWS_ElasticBlockStore_size: 200Gi
resources:
enabled: false
Expand Down

0 comments on commit 5433db0

Please sign in to comment.