-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfileDev
44 lines (29 loc) · 968 Bytes
/
DockerfileDev
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM alpine:3.19 AS frontend
WORKDIR /opt/frontend
RUN apk add --no-cache curl unzip ca-certificates \
&& curl -L https://github.com/remnawave/frontend/releases/download/dev-build/remnawave-frontend.zip -o frontend.zip \
&& unzip frontend.zip -d frontend_temp
FROM node:22 AS backend-build
WORKDIR /opt/app
COPY package*.json ./
COPY prisma ./prisma
RUN npm ci
COPY . .
RUN npm run build
RUN npm run migrate:generate
RUN npm cache clean --force
RUN npm prune --omit=dev
FROM node:22
WORKDIR /opt/app
COPY --from=backend-build /opt/app/dist ./dist
COPY --from=frontend /opt/frontend/frontend_temp/dist ./frontend
COPY --from=backend-build /opt/app/prisma ./prisma
COPY --from=backend-build /opt/app/node_modules ./node_modules
COPY configs /var/lib/remnawave/configs
COPY package*.json ./
COPY libs ./libs
COPY ecosystem.config.js ./
COPY docker-entrypoint.sh ./
RUN npm install pm2 -g \
&& npm link
CMD [ "/bin/sh", "docker-entrypoint.sh" ]