-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (36 loc) · 1.37 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM node:20-alpine as base
LABEL org.opencontainers.image.source=https://github.com/aarontravass/medihacks2024
LABEL org.opencontainers.image.licenses=MIT
RUN corepack enable
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV NODE_ENV=production
RUN apk add --update --virtual .deps --no-cache gnupg && \
cd /tmp && \
wget https://releases.hashicorp.com/hcp/0.4.0/hcp_0.4.0_linux_amd64.zip && \
wget https://releases.hashicorp.com/hcp/0.4.0/hcp_0.4.0_SHA256SUMS && \
wget https://releases.hashicorp.com/hcp/0.4.0/hcp_0.4.0_SHA256SUMS.sig && \
wget -qO- https://www.hashicorp.com/.well-known/pgp-key.txt | gpg --import && \
gpg --verify hcp_0.4.0_SHA256SUMS.sig hcp_0.4.0_SHA256SUMS && \
grep hcp_0.4.0_linux_amd64.zip hcp_0.4.0_SHA256SUMS | sha256sum -c && \
unzip /tmp/hcp_0.4.0_linux_amd64.zip -d /tmp && \
mv /tmp/hcp /usr/local/bin/hcp && \
rm -f /tmp/hcp_0.4.0_linux_amd64.zip hcp_0.4.0_SHA256SUMS 0.4.0/hcp_0.4.0_SHA256SUMS.sig && \
apk del .deps
WORKDIR /app
COPY . /app/
RUN npm pkg delete scripts.prepare
RUN rm -rf /app/packages/web
RUN pnpm i --prod && pnpm i -r --prod
WORKDIR /app/packages/prisma
RUN pnpm generate
FROM base as platform
WORKDIR /app/packages/platform
RUN pnpm build
EXPOSE 3000
CMD [ "pnpm", "start" ]
FROM base as upload
WORKDIR /app/packages/upload
RUN pnpm build
EXPOSE 3000
CMD [ "pnpm", "start" ]