Skip to content

Commit

Permalink
node test
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronskiba committed Jan 24, 2025
1 parent 0fc5b0e commit 4f40d8b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Dockerfile.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM node:20.15.1-alpine AS node
FROM surnet/alpine-wkhtmltopdf:3.21.2-0.12.6-small AS wkhtmltopdf

FROM ruby:3.1.4-alpine AS builder
Expand All @@ -15,10 +16,16 @@ ENV INSTALL_PATH=/usr/src/app \
# - shared-mime-info:: required to compile mimemagic gem
# - tzdata: required to compile tzinfo gem
RUN apk add --no-cache \
build-base musl-dev postgresql-dev git nodejs yarn shared-mime-info tzdata
build-base musl-dev postgresql-dev git shared-mime-info tzdata

WORKDIR $INSTALL_PATH

COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin
COPY --from=node /opt /opt

# For Bundler caching
COPY Gemfile* $INSTALL_PATH
RUN gem install bundler -v "$(tail -1 Gemfile.lock | tr -d " ")" && \
Expand Down Expand Up @@ -51,7 +58,7 @@ ENV INSTALL_PATH=/usr/src/app \
# - postgresql-client: Required for pg gem to connect to PostgreSQL
# - wget: Required for healthcheck
RUN apk add --no-cache \
postgresql-client wget nodejs \
postgresql-client wget \
# Install dependencies for wkhtmltopdf (See https://github.com/Surnet/docker-wkhtmltopdf/pkgs/container/alpine-wkhtmltopdf#other-images)
libstdc++ \
libx11 \
Expand All @@ -77,6 +84,10 @@ RUN apk add --no-cache \

WORKDIR $INSTALL_PATH

COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin
# Copy wkhtmltopdf binary
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /usr/bin/wkhtmltopdf
# Copy data for timezone and mime types
Expand Down

0 comments on commit 4f40d8b

Please sign in to comment.