2022-04-12 12:59:17 +00:00
|
|
|
FROM node:16.13.1
|
2019-10-12 15:13:21 +00:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
2022-04-12 12:59:17 +00:00
|
|
|
ENV PL_ASSETS_DIR=/assets
|
|
|
|
ENV PL_ATTACHMENTS_DIR=/attachments
|
2019-10-12 15:13:21 +00:00
|
|
|
|
|
|
|
WORKDIR /padloc
|
|
|
|
|
|
|
|
# Only copy over the packages files of all required packages.
|
|
|
|
# This will ensure that we don't have to install all dependencies
|
|
|
|
# again if any source files change.
|
|
|
|
COPY package*.json lerna.json tsconfig.json ./
|
|
|
|
COPY packages/server/package*.json ./packages/server/
|
|
|
|
COPY packages/core/package*.json ./packages/core/
|
|
|
|
COPY packages/locale/package*.json ./packages/locale/
|
|
|
|
|
2019-10-12 18:25:36 +00:00
|
|
|
# Install dependencies and bootstrap packages
|
2019-10-12 15:13:21 +00:00
|
|
|
RUN npm ci --unsafe-perm
|
|
|
|
|
|
|
|
# Now copy over source files and assets
|
|
|
|
COPY packages/server/src ./packages/server/src
|
|
|
|
COPY packages/server/tsconfig.json ./packages/server/
|
|
|
|
COPY packages/core/src ./packages/core/src
|
|
|
|
COPY packages/core/vendor ./packages/core/vendor
|
|
|
|
COPY packages/core/tsconfig.json ./packages/core/
|
|
|
|
COPY packages/locale/src ./packages/locale/src
|
|
|
|
COPY packages/locale/res ./packages/locale/res
|
|
|
|
COPY packages/locale/tsconfig.json ./packages/locale/
|
2022-04-12 12:59:17 +00:00
|
|
|
COPY assets /assets
|
2019-10-12 15:13:21 +00:00
|
|
|
|
2022-04-12 12:59:17 +00:00
|
|
|
WORKDIR /padloc/packages/server
|
2021-09-09 14:29:55 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["npm", "run"]
|
2019-10-12 15:13:21 +00:00
|
|
|
|
|
|
|
CMD ["start"]
|