Skip to content

Commit 165517b

Browse files
FIX (postgresql): Use real binaries instead of symlinks
1 parent 6e6b642 commit 165517b

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Dockerfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ FROM --platform=$BUILDPLATFORM golang:1.23.3 AS backend-build
2121

2222
# Install Go public tools needed in runtime
2323
RUN curl -fsSL https://raw.githubusercontent.com/pressly/goose/master/install.sh | sh
24-
RUN go install github.com/swaggo/swag/cmd/swag@latest
24+
RUN go install github.com/swaggo/swag/cmd/swag@1.16.4
2525

2626
# Set working directory
2727
WORKDIR /app
@@ -65,14 +65,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
6565
postgresql-client-16 postgresql-client-17 && \
6666
rm -rf /var/lib/apt/lists/*
6767

68-
# Create symlinks for PostgreSQL client tools
69-
RUN for v in 13 14 15 16 17; do \
70-
mkdir -p /usr/pgsql-$v/bin && \
71-
for b in pg_dump psql pg_restore createdb dropdb; do \
72-
ln -sf /usr/bin/$b /usr/pgsql-$v/bin/$b; \
73-
done; \
74-
done
75-
7668
WORKDIR /app
7769

7870
# Copy Goose from build stage

backend/internal/util/tools/postgresql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ func getPostgresqlBasePath(
161161
"bin",
162162
)
163163
} else {
164-
return fmt.Sprintf("/usr/pgsql-%s/bin", string(version))
164+
return fmt.Sprintf("/usr/lib/postgresql/%s/bin", string(version))
165165
}
166166
}

0 commit comments

Comments
 (0)