-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
36 lines (24 loc) · 765 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
FROM node:18-alpine as nodebuilder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY /src ./src
COPY /public ./public
COPY tsconfig.json webpack.server.js .babelrc ./
ARG REACT_APP_BOT_URI
RUN echo ${REACT_APP_BOT_URI}
RUN npm run build
RUN npm run build-server
#############################################################################
FROM node:18-alpine as backend
WORKDIR /app
ENV NODE_ENV production
COPY --from=nodebuilder /app/node_modules ./node_modules
COPY --from=nodebuilder /app/build ./build
COPY --from=nodebuilder /app/server-build ./server
COPY drizzle.config.ts ./
COPY /migrations ./migrations
CMD node server/index.js
FROM nginx:stable-alpine as frontend
WORKDIR /www
COPY --from=nodebuilder /app/build /www