Commit bf491c6 1 parent 4dbd861 commit bf491c6 Copy full SHA for bf491c6
File tree 3 files changed +23
-32
lines changed
3 files changed +23
-32
lines changed Original file line number Diff line number Diff line change 30
30
uses : docker/build-push-action@v5
31
31
with :
32
32
context : .
33
- platforms : linux/amd64,linux/arm64
33
+ platforms : linux/amd64
34
34
push : true
35
35
tags : ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ github.sha }}
Original file line number Diff line number Diff line change 1
1
ARG APP_PATH=/opt/outline
2
- FROM outlinewiki/outline-base AS base
2
+ FROM node:20-slim AS base
3
+
4
+ ARG APP_PATH
5
+ WORKDIR $APP_PATH
6
+ COPY ./package.json ./yarn.lock ./
7
+ COPY ./patches ./patches
8
+
9
+ RUN yarn install --no-optional --frozen-lockfile --network-timeout 1000000 && \
10
+ yarn cache clean
11
+
12
+ COPY . .
13
+ ARG CDN_URL
14
+ RUN yarn build
15
+
16
+ RUN rm -rf node_modules
17
+
18
+ RUN yarn install --production=true --frozen-lockfile --network-timeout 1000000 && \
19
+ yarn cache clean
20
+
21
+ ENV PORT=3000
22
+
3
23
4
24
ARG APP_PATH
5
25
WORKDIR $APP_PATH
@@ -20,11 +40,6 @@ COPY --from=base $APP_PATH/.sequelizerc ./.sequelizerc
20
40
COPY --from=base $APP_PATH/node_modules ./node_modules
21
41
COPY --from=base $APP_PATH/package.json ./package.json
22
42
23
- # Install wget to healthcheck the server
24
- RUN apt-get update \
25
- && apt-get install -y wget \
26
- && rm -rf /var/lib/apt/lists/*
27
-
28
43
# Create a non-root user compatible with Debian and BusyBox based images
29
44
RUN addgroup --gid 1001 nodejs && \
30
45
adduser --uid 1001 --ingroup nodejs nodejs && \
@@ -38,10 +53,7 @@ RUN mkdir -p "$FILE_STORAGE_LOCAL_ROOT_DIR" && \
38
53
chmod 1777 "$FILE_STORAGE_LOCAL_ROOT_DIR"
39
54
40
55
VOLUME /var/lib/outline/data
41
-
42
56
USER nodejs
43
-
44
- HEALTHCHECK --interval=1m CMD wget -qO- "http://localhost:${PORT:-3000}/_health" | grep -q "OK" || exit 1
45
-
46
57
EXPOSE 3000
58
+
47
59
CMD ["yarn" , "start" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments