mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
chore: update Dockerfile and package dependencies for pg-native support
- Added build dependencies for native Node.js modules in the Dockerfile, including python3, make, g++, and postgresql-dev. - Installed postgresql-libs and removed build dependencies after installation to reduce image size. - Updated pnpm-lock.yaml to include pg-native version 3.5.2 and adjusted related package versions accordingly. - Modified package.json to add pg-native as a dependency. - Updated vite.config.ts to include pg-native in the external dependencies list. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -37,6 +37,10 @@ WORKDIR /app
|
||||
# - perl-image-exiftool: provides the exiftool binary
|
||||
# - vips: runtime library for sharp
|
||||
# - libheif: enable HEIF/HEIC support in libvips when available
|
||||
# Build deps for native modules (pg-native/libpq):
|
||||
# - python3, make, g++: required to build native Node.js modules
|
||||
# - postgresql-dev: provides libpq headers and runtime library for pg-native
|
||||
# - postgresql-libs: runtime library for libpq (kept after build)
|
||||
RUN apk add --no-cache \
|
||||
curl \
|
||||
perl \
|
||||
@@ -46,6 +50,12 @@ RUN apk add --no-cache \
|
||||
libheif \
|
||||
libc6-compat \
|
||||
gcompat \
|
||||
postgresql-libs \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
python3 \
|
||||
make \
|
||||
g++ \
|
||||
postgresql-dev \
|
||||
&& EXIFTOOL_BIN="$(command -v exiftool)" \
|
||||
&& echo "Using exiftool binary at ${EXIFTOOL_BIN}" \
|
||||
&& "${EXIFTOOL_BIN}" -ver \
|
||||
@@ -64,6 +74,9 @@ RUN if [ -f dist/package.json ]; then \
|
||||
npm install --omit=dev --no-audit --no-fund; \
|
||||
fi
|
||||
|
||||
# Remove build tools after native modules are built to reduce image size
|
||||
RUN apk del .build-deps
|
||||
|
||||
EXPOSE 1841
|
||||
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user