-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (26 loc) · 675 Bytes
/
Dockerfile
File metadata and controls
42 lines (26 loc) · 675 Bytes
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
FROM imbios/bun-node as base
# install server
WORKDIR /app/server
COPY ./server/package.json ./server/bun.lockb ./
RUN bun install
FROM base as client
WORKDIR /app/client
COPY ./client/package.json ./client/bun.lockb ./
RUN bun install
COPY ./client ./
# COPY server source from ./server/src to ../server/src
COPY ./server/src ../server/src
RUN bun run build
FROM base as server
WORKDIR /app/server
COPY ./server ./
RUN bunx prisma generate
RUN bun run build
COPY --from=client /app/client/dist ./client/dist
ENV PORT=3000
EXPOSE 3000
ENV NODE_ENV=production
# copy and permit start.sh
COPY ./start.sh ./
RUN chmod +x ./start.sh
CMD ["sh", "-c", "./start.sh"]