mirror of
https://github.com/flameshikari/outline-ru.git
synced 2026-08-03 13:27:09 +03:00
update Dockerfile
This commit is contained in:
+5
-4
@@ -7,9 +7,6 @@ WORKDIR $APP_PATH
|
||||
FROM base AS build
|
||||
COPY ./src/package.json ./src/yarn.lock ./
|
||||
COPY ./src/patches ./patches
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN yarn install --no-optional --frozen-lockfile --network-timeout 1000000 && \
|
||||
yarn cache clean
|
||||
COPY src .
|
||||
@@ -20,7 +17,7 @@ RUN rm -rf node_modules
|
||||
RUN yarn install --production=true --frozen-lockfile --network-timeout 1000000 && \
|
||||
yarn cache clean
|
||||
ENV PORT=3000
|
||||
HEALTHCHECK CMD wget -qO- http://localhost:${PORT}/_health | grep -q "OK" || exit 1
|
||||
|
||||
|
||||
FROM base AS release
|
||||
ENV NODE_ENV=production
|
||||
@@ -30,6 +27,9 @@ COPY --from=build $APP_PATH/public ./public
|
||||
COPY --from=build $APP_PATH/.sequelizerc ./.sequelizerc
|
||||
COPY --from=build $APP_PATH/node_modules ./node_modules
|
||||
COPY --from=build $APP_PATH/package.json ./package.json
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN addgroup --gid 1001 nodejs && \
|
||||
adduser --uid 1001 --ingroup nodejs nodejs && \
|
||||
chown -R nodejs:nodejs $APP_PATH/build && \
|
||||
@@ -41,5 +41,6 @@ RUN mkdir -p "$FILE_STORAGE_LOCAL_ROOT_DIR" && \
|
||||
chmod 1777 "$FILE_STORAGE_LOCAL_ROOT_DIR"
|
||||
VOLUME /var/lib/outline/data
|
||||
USER nodejs
|
||||
HEALTHCHECK CMD wget -qO- http://localhost:${PORT}/_health | grep -q "OK" || exit 1
|
||||
EXPOSE 3000
|
||||
CMD ["yarn", "start"]
|
||||
|
||||
Reference in New Issue
Block a user