@@ -21,15 +21,19 @@ COPY ./bin/* /fly/bin/
21
21
22
22
FROM ubuntu:24.04
23
23
24
- ENV PGDATA=/data/postgresql
25
- ENV PGPASSFILE=/data/.pgpass
26
- ENV AWS_SHARED_CREDENTIALS_FILE=/data/.aws/credentials
27
24
ARG VERSION
28
25
ARG PG_MAJOR_VERSION
29
26
ARG POSTGIS_MAJOR=3
30
27
ARG HAPROXY_VERSION=2.8
31
28
ARG REPMGR_VERSION=5.4.1-1build2
32
29
30
+ ENV PGDATA=/data/postgresql
31
+ ENV PGPASSFILE=/data/.pgpass
32
+ ENV AWS_SHARED_CREDENTIALS_FILE=/data/.aws/credentials
33
+ ENV PG_MAJOR_VERSION=${PG_MAJOR_VERSION}
34
+ ENV PATH="/usr/lib/postgresql/${PG_MAJOR_VERSION}/bin:$PATH"
35
+
36
+
33
37
LABEL fly.app_role=postgres_cluster
34
38
LABEL fly.version=${VERSION}
35
39
LABEL fly.pg-version=${PG_VERSION}
@@ -63,16 +67,15 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
63
67
haproxy=$HAPROXY_VERSION.\* \
64
68
&& apt autoremove -y && apt clean
65
69
66
-
67
- # Add PostgreSQL bin directory to PATH
68
- ENV PATH="/usr/lib/postgresql/${PG_MAJOR_VERSION}/bin:$PATH"
69
-
70
70
# Copy Go binaries from the builder stage
71
71
COPY --from=builder /fly/bin/* /usr/local/bin
72
72
73
73
# Copy Postgres exporter
74
74
COPY --from=wrouesnel/postgres_exporter:latest /postgres_exporter /usr/local/bin/
75
75
76
+ # Move pg_rewind into path.
77
+ RUN ln -s /usr/lib/postgresql/${PG_MAJOR_VERSION}/bin/pg_rewind /usr/bin/pg_rewind
78
+
76
79
ADD /config/* /fly/
77
80
RUN mkdir -p /run/haproxy/
78
81
RUN usermod -d /data postgres
0 commit comments