personal-gallery-node/Dockerfile

35 lines
699 B
Docker
Raw Normal View History

2021-03-23 14:12:51 +00:00
FROM node:lts-alpine as frontend-build
WORKDIR /app
COPY ./ /app
2021-04-12 14:20:08 +00:00
RUN yarn workspaces focus web \
2021-03-23 14:12:51 +00:00
&& yarn workspace web build
2021-08-29 08:02:12 +00:00
FROM node:lts-bullseye
2021-03-23 14:12:51 +00:00
WORKDIR /app
COPY ./ /app
COPY --from=frontend-build /app/packages/web/build /app/packages/server/public
2021-08-30 08:09:33 +00:00
RUN apt-get update && \
apt-get install -y \
2021-03-23 14:12:51 +00:00
ffmpeg \
python3 \
2021-08-30 08:10:00 +00:00
libjemalloc-dev \
2021-08-29 08:07:54 +00:00
build-essential \
2021-03-23 14:12:51 +00:00
&& yarn --version\
&& yarn workspaces focus server\
&& yarn workspace server build \
2021-08-30 08:09:33 +00:00
&& yarn cache clean --all \
&& rm -rf /var/lib/apt/lists/* \
&& find /usr/ -name "*jemalloc.so" > /etc/ld.so.preload
2021-03-23 14:12:51 +00:00
VOLUME ["/images", "/db"]
ENV IMAGE_DIR="/images"
ENV DB_DIR="/db"
ENV PORT=80
ENTRYPOINT [ "yarn", "start" ]