mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-23 13:01:30 +00:00
580b469d59
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
30 lines
721 B
Docker
30 lines
721 B
Docker
# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
#
|
|
# SPDX-License-Identifier: CC-BY-SA-4.0
|
|
|
|
# BUILD
|
|
FROM node:18-alpine AS builder
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
WORKDIR /app
|
|
COPY . ./
|
|
RUN yarn install --immutable && \
|
|
yarn build:for-real-backend
|
|
|
|
# RUNNER
|
|
FROM node:18-alpine
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
WORKDIR /app
|
|
RUN chown node:node -R /app
|
|
|
|
COPY --from=builder --chown=node:node /app/.next/standalone ./
|
|
COPY --from=builder --chown=node:node /app/.next/static ./.next/static
|
|
COPY --from=builder --chown=node:node /app/public ./public
|
|
COPY --from=builder --chown=node:node /app/package.json ./package.json
|
|
|
|
USER node
|
|
|
|
EXPOSE 3001/tcp
|
|
CMD ["node", "server.js"]
|