-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 loc) · 1000 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
ARG TAG=latest
FROM docker.io/infisical/backend:${TAG} as backend
FROM docker.io/infisical/frontend:${TAG} as frontend
FROM docker.io/node:16-alpine as runner
RUN mkdir /app
RUN apk add --no-cache nginx wget
RUN npm i --unsafe-perm -g pm2@5.3.0
WORKDIR /app
COPY --from=backend /app /app/backend
COPY --from=frontend /app /app/frontend
RUN chown -R root:root /app
COPY set-telemetry.sh /app/frontend/scripts/set-telemetry.sh
RUN /app/frontend/scripts/set-telemetry.sh
ENV npm_config_cache /app/.npm
RUN cd /app/frontend && npm i --unsafe-perm --platform=linux --arch=x64 --libc=musl sharp
RUN rm -rf /app/.npm
COPY nginx.conf /etc/nginx/nginx.conf
COPY default.conf /etc/nginx/http.d/default.conf
COPY ecosystem.config.js /app/ecosystem.config.js
WORKDIR /app
RUN wget -O - https://github.com/DarthSim/hivemind/releases/download/v1.1.0/hivemind-v1.1.0-linux-amd64.gz | gunzip -c > hivemind
RUN chmod +x ./hivemind
COPY Procfile /app/Procfile
EXPOSE 8080
CMD ["/app/hivemind", "/app/Procfile"]