Skip to content

Commit

Permalink
Merge pull request #293 from OpenHistoricalMap/staging
Browse files Browse the repository at this point in the history
 DB migration postgres 11 to 14
  • Loading branch information
Rub21 authored May 2, 2024
2 parents cec98e1 + daa10f4 commit 4b1bfa1
Show file tree
Hide file tree
Showing 14 changed files with 1,788 additions and 72 deletions.
14 changes: 7 additions & 7 deletions compose/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'
services:
db:
platform: linux/amd64
image: osmseed-db:v1
image: ohm-db:v2
build:
context: ./../images/db
dockerfile: Dockerfile
Expand All @@ -11,16 +11,16 @@ services:
volumes:
- ./data/db-data:/var/lib/postgresql/data
env_file:
- ./.env.web
- ./../envs/.env.web
web:
image: osmseed-web:v1
image: ohm-web:v1
build:
context: ./../images/web
dockerfile: Dockerfile
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
22 changes: 10 additions & 12 deletions images/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
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/
RUN mkdir -p db
RUN mkdir -p lib
ADD functions/ db/functions/
ADD lib/quad_tile/ lib/quad_tile/

RUN make -C db/functions/
RUN chown -R postgres lib/
RUN chown -R postgres db/
COPY start.sh /usr/local/bin/
COPY config/postgresql.*.conf /etc/postgresql/

CMD ["/usr/local/bin/start.sh"]
Loading

0 comments on commit 4b1bfa1

Please sign in to comment.