FIX (postgresql): Use real binaries instead of symlinks

This commit is contained in:
Rostislav Dugin
2025-07-17 15:09:14 +03:00
parent 6e6b642f4a
commit 165517b792
2 changed files with 2 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ FROM --platform=$BUILDPLATFORM golang:1.23.3 AS backend-build
# Install Go public tools needed in runtime
RUN curl -fsSL https://raw.githubusercontent.com/pressly/goose/master/install.sh | sh
RUN go install github.com/swaggo/swag/cmd/swag@latest
RUN go install github.com/swaggo/swag/cmd/swag@1.16.4
# Set working directory
WORKDIR /app
@@ -65,14 +65,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
postgresql-client-16 postgresql-client-17 && \
rm -rf /var/lib/apt/lists/*
# Create symlinks for PostgreSQL client tools
RUN for v in 13 14 15 16 17; do \
mkdir -p /usr/pgsql-$v/bin && \
for b in pg_dump psql pg_restore createdb dropdb; do \
ln -sf /usr/bin/$b /usr/pgsql-$v/bin/$b; \
done; \
done
WORKDIR /app
# Copy Goose from build stage

View File

@@ -161,6 +161,6 @@ func getPostgresqlBasePath(
"bin",
)
} else {
return fmt.Sprintf("/usr/pgsql-%s/bin", string(version))
return fmt.Sprintf("/usr/lib/postgresql/%s/bin", string(version))
}
}