forked from ThisIsRuvos/ersd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (28 loc) · 933 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.11.4-slim AS build-ersd
RUN apt-get update && \
apt-get install curl make gcc g++ -y
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get install nodejs -y
WORKDIR /ersd
COPY . .
RUN npm ci
RUN npm run build:server
RUN npm run build:client
RUN npm prune --omit=dev
FROM ubuntu:jammy-20240911.1
RUN apt-get update && \
apt-get install curl -y && \
apt-get upgrade -y
RUN curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh
RUN chmod 500 nsolid_setup_deb.sh
RUN ./nsolid_setup_deb.sh 18
RUN apt-get install nodejs -y
RUN apt-get clean
RUN mkdir -p /ersd/server && mkdir /ersd/client
WORKDIR /ersd
COPY --from=build-ersd /ersd/node_modules/. /ersd/node_modules/
COPY --from=build-ersd /ersd/dist/apps/client/. /ersd/client/
COPY --from=build-ersd /ersd/dist/apps/server/. /ersd/server/
WORKDIR /ersd/server
RUN mkdir -p /ersd/server/assets
EXPOSE 3333
ENTRYPOINT ["node", "main.js"]