Skip to content

Commit e7c9c32

Browse files
committed
fix: get pg_dump from the imported database
1 parent d0ba054 commit e7c9c32

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
matrix:
2525
pg_image:
2626
- pg14-timescale-2.16
27-
- pg18
27+
- pg-18
2828
include:
29-
- pg_image: pg18
29+
- pg_image: pg-18
3030
latest: true
3131
steps:
3232
- uses: actions/checkout@v4

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG ALPINE_VERSION=3.22
2-
ARG PG_IMAGE=pg14-timescale-2.16
2+
ARG PG_IMAGE=pg-18
33
FROM alpine:${ALPINE_VERSION} AS pgbadger-builder
44

55
RUN apk add --no-cache \
@@ -42,7 +42,6 @@ RUN apk add -uU --no-cache \
4242
su-exec \
4343
openssl \
4444
krb5 \
45-
postgresql17-client \
4645
perl
4746

4847
# Copy pgBadger
@@ -55,15 +54,16 @@ COPY --from=build /app/dist /app/dist
5554
COPY --from=build /app/node_modules /app/node_modules
5655

5756
# Setup postgres user and directories
58-
RUN mkdir -p /var/lib/postgresql/data \
57+
RUN addgroup -S postgres && adduser -S -G postgres postgres \
58+
&& mkdir -p /var/lib/postgresql/data \
5959
&& chown -R postgres:postgres /var/lib/postgresql \
6060
&& chown -R postgres:postgres /usr/local/pgsql \
6161
&& chmod 1777 /tmp
6262

6363
WORKDIR /app
64-
# making sure we use the binaries from the installed postgresql17 client
65-
ENV PG_DUMP_BINARY=/usr/bin/pg_dump
66-
ENV PG_RESTORE_BINARY=/usr/bin/pg_restore
64+
# pg_dump and pg_restore come from /usr/local/pgsql/bin copied from postgres-source
65+
ENV PG_DUMP_BINARY=/usr/local/pgsql/bin/pg_dump
66+
ENV PG_RESTORE_BINARY=/usr/local/pgsql/bin/pg_restore
6767
ENV PATH="/usr/local/pgsql/bin:$PATH"
6868
ENV PGDATA=/var/lib/postgresql/data
6969

0 commit comments

Comments
 (0)