Upgrade to postgresql 12
This commit is contained in:
parent
6e5f4f485d
commit
e249f30d40
19
Dockerfile
19
Dockerfile
@ -10,7 +10,10 @@ ENV UPDATES=disabled
|
|||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN echo "deb [ allow-insecure=yes ] http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" >> /etc/apt/sources.list.d/pgdg.list \
|
RUN apt-get update \
|
||||||
|
&& apt-get install wget gnupg2 lsb-core -y \
|
||||||
|
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
||||||
|
&& echo "deb [ trusted=yes ] http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y apt-transport-https ca-certificates \
|
&& apt-get install -y apt-transport-https ca-certificates \
|
||||||
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
|
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
|
||||||
@ -24,7 +27,9 @@ RUN echo "deb [ allow-insecure=yes ] http://apt.postgresql.org/pub/repos/apt/ bi
|
|||||||
fonts-noto-hinted \
|
fonts-noto-hinted \
|
||||||
fonts-noto-unhinted \
|
fonts-noto-unhinted \
|
||||||
clang \
|
clang \
|
||||||
|
gcc \
|
||||||
gdal-bin \
|
gdal-bin \
|
||||||
|
make \
|
||||||
git-core \
|
git-core \
|
||||||
libagg-dev \
|
libagg-dev \
|
||||||
libboost-all-dev \
|
libboost-all-dev \
|
||||||
@ -52,10 +57,9 @@ RUN echo "deb [ allow-insecure=yes ] http://apt.postgresql.org/pub/repos/apt/ bi
|
|||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
npm \
|
||||||
postgis \
|
postgis \
|
||||||
postgresql-10 \
|
postgresql-12 \
|
||||||
postgresql-10-postgis-2.5 \
|
postgresql-server-dev-12 \
|
||||||
postgresql-10-postgis-2.5-scripts \
|
postgresql-contrib-12 \
|
||||||
postgresql-contrib-10 \
|
|
||||||
protobuf-c-compiler \
|
protobuf-c-compiler \
|
||||||
python-mapnik \
|
python-mapnik \
|
||||||
sudo \
|
sudo \
|
||||||
@ -72,6 +76,11 @@ RUN echo "deb [ allow-insecure=yes ] http://apt.postgresql.org/pub/repos/apt/ bi
|
|||||||
&& apt-get autoremove --yes \
|
&& apt-get autoremove --yes \
|
||||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
|
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
|
||||||
|
|
||||||
|
# Set up PostGIS
|
||||||
|
RUN wget http://download.osgeo.org/postgis/source/postgis-3.0.0rc2.tar.gz
|
||||||
|
RUN tar -xvzf postgis-3.0.0rc2.tar.gz
|
||||||
|
RUN cd postgis-3.0.0rc2 && ./configure && make && make install
|
||||||
|
|
||||||
# Set up renderer user
|
# Set up renderer user
|
||||||
RUN adduser --disabled-password --gecos "" renderer
|
RUN adduser --disabled-password --gecos "" renderer
|
||||||
USER renderer
|
USER renderer
|
||||||
|
4
Makefile
4
Makefile
@ -8,5 +8,5 @@ push: build
|
|||||||
|
|
||||||
test: build
|
test: build
|
||||||
docker volume create openstreetmap-data
|
docker volume create openstreetmap-data
|
||||||
docker run -v openstreetmap-data:/var/lib/postgresql/10/main overv/openstreetmap-tile-server import
|
docker run -v openstreetmap-data:/var/lib/postgresql/12/main overv/openstreetmap-tile-server import
|
||||||
docker run -v openstreetmap-data:/var/lib/postgresql/10/main -p 80:80 -d overv/openstreetmap-tile-server run
|
docker run -v openstreetmap-data:/var/lib/postgresql/12/main -p 80:80 -d overv/openstreetmap-tile-server run
|
||||||
|
6
run.sh
6
run.sh
@ -3,9 +3,9 @@
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
function createPostgresConfig() {
|
function createPostgresConfig() {
|
||||||
cp /etc/postgresql/10/main/postgresql.custom.conf.tmpl /etc/postgresql/10/main/postgresql.custom.conf
|
cp /etc/postgresql/12/main/postgresql.custom.conf.tmpl /etc/postgresql/12/main/postgresql.custom.conf
|
||||||
sudo -u postgres echo "autovacuum = $AUTOVACUUM" >> /etc/postgresql/10/main/postgresql.custom.conf
|
sudo -u postgres echo "autovacuum = $AUTOVACUUM" >> /etc/postgresql/12/main/postgresql.custom.conf
|
||||||
cat /etc/postgresql/10/main/postgresql.custom.conf
|
cat /etc/postgresql/12/main/postgresql.custom.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPostgresPassword() {
|
function setPostgresPassword() {
|
||||||
|
Loading…
Reference in New Issue
Block a user