-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
27 lines (24 loc) · 1005 Bytes
/
Dockerfile
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
# BUILDER
FROM node:22-alpine AS strautomator-web-builder
ENV NODE_ENV=production
WORKDIR /app
COPY . .
RUN apk add bash git openssh && git config --global init.defaultBranch master && npm install --prefer-online && ./node_modules/.bin/tsc && npm run build
# DEPENDENCIES
FROM node:22-alpine AS strautomator-web-dependencies
ENV NODE_ENV=production
WORKDIR /app
COPY . .
RUN apk add bash git openssh && git config --global init.defaultBranch master && npm install --prefer-online --production && rm -rf ./node_modules/typescript
# FINAL IMAGE
FROM node:22-alpine AS strautomator-web-final
ENV NODE_ENV=production
ENV JSON_LOGGING=true
ENV HOST 0.0.0.0
WORKDIR /app
COPY . .
COPY --from=strautomator-web-dependencies ./app/node_modules ./node_modules
COPY --from=strautomator-web-builder ./app/node_modules/strautomator-core/lib ./node_modules/strautomator-core/lib
COPY --from=strautomator-web-builder ./app/server ./server
COPY --from=strautomator-web-builder ./app/.nuxt ./.nuxt
CMD ["npm", "start"]