@@ -3,6 +3,7 @@ FROM postgis/postgis:16-3.4
3
3
LABEL maintainer="PgOSM Flex - https://github.com/rustprooflabs/pgosm-flex"
4
4
5
5
ARG OSM2PGSQL_BRANCH=master
6
+ ARG BOUNCER_VERSION=1.17.0
6
7
7
8
RUN apt-get update \
8
9
# Removed upgrade per https://github.com/rustprooflabs/pgosm-flex/issues/322
@@ -18,6 +19,7 @@ RUN apt-get update \
18
19
curl unzip \
19
20
postgresql-16-pgrouting \
20
21
nlohmann-json3-dev \
22
+ pkg-config libevent-2.1-7 libevent-dev libudns-dev \
21
23
&& rm -rf /var/lib/apt/lists/*
22
24
23
25
RUN wget https://luarocks.org/releases/luarocks-3.9.2.tar.gz \
@@ -32,6 +34,19 @@ RUN curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py \
32
34
RUN luarocks install inifile
33
35
RUN luarocks install luasql-postgres PGSQL_INCDIR=/usr/include/postgresql/
34
36
37
+ # pgBouncer implementation based on: https://github.com/edoburu/docker-pgbouncer/blob/master/Dockerfile
38
+ RUN curl -o /tmp/pgbouncer-$BOUNCER_VERSION.tar.gz -L https://pgbouncer.github.io/downloads/files/$BOUNCER_VERSION/pgbouncer-$BOUNCER_VERSION.tar.gz \
39
+ && cd /tmp \
40
+ && tar xvfz /tmp/pgbouncer-$BOUNCER_VERSION.tar.gz \
41
+ && cd pgbouncer-$BOUNCER_VERSION \
42
+ && ./configure --prefix=/usr --with-udns \
43
+ && make \
44
+ && cp pgbouncer /usr/bin \
45
+ && mkdir -p /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer \
46
+ && cp etc/pgbouncer.ini /etc/pgbouncer/pgbouncer.ini.example \
47
+ && cp etc/userlist.txt /etc/pgbouncer/userlist.txt.example \
48
+ && touch /etc/pgbouncer/userlist.txt \
49
+ && chown -R postgres /var/run/pgbouncer /etc/pgbouncer
35
50
36
51
WORKDIR /tmp
37
52
RUN git clone --depth 1 --branch $OSM2PGSQL_BRANCH https://github.com/openstreetmap/osm2pgsql.git \
@@ -45,6 +60,7 @@ RUN git clone --depth 1 --branch $OSM2PGSQL_BRANCH https://github.com/openstreet
45
60
libexpat1-dev zlib1g-dev \
46
61
libbz2-dev libproj-dev \
47
62
curl \
63
+ pkg-config libevent-dev \
48
64
&& apt autoremove -y \
49
65
&& cd /tmp && rm -r /tmp/osm2pgsql
50
66
0 commit comments