-
-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (27 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
28 lines (27 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM node:24-alpine AS build
RUN apk add --no-cache build-base g++
WORKDIR /build
COPY . .
RUN npm ci && \
npm run build && \
npm run reset && \
npm -w backend ci --omit=dev
FROM node:24-alpine AS sync-in
RUN apk add --no-cache su-exec && \
mkdir -p /app/data /app/environment
WORKDIR /app
COPY --from=build --chown=8888:8888 /build/LICENSE .
COPY --from=build --chown=8888:8888 /build/dist/ .
COPY --from=build --chown=8888:8888 /build/package.json ./server/
COPY --from=build --chown=8888:8888 /build/node_modules ./node_modules
COPY --from=build --chown=8888:8888 /build/backend/migrations ./migrations
COPY --from=build --chown=8888:8888 /build/environment/environment.dist.yaml ./environment/environment.dist.yaml
COPY --from=build --chown=8888:8888 --chmod=755 /build/scripts/docker-sync-in-server.sh ./sync-in-server.sh
COPY --from=build --chown=8888:8888 --chmod=755 /build/scripts/docker-entrypoint.sh ./entrypoint.sh
ENV NODE_ENV=production
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
ENV PUID=8888
ENV PGID=8888
EXPOSE 8080
ENTRYPOINT ["./entrypoint.sh"]
CMD ["/bin/sh", "sync-in-server.sh"]