-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
32 lines (26 loc) · 1.2 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
# Build Mute
FROM docker.io/node:18-alpine AS builder
# Setting up higher heap memory limit as otherwise CI would throw an error during the npm run build step (default is 512mb)
ENV NODE_OPTIONS=--max_old_space_size=2048
ARG BUILD_TARGET
WORKDIR /app
COPY . ./
RUN apk add git
RUN apk add bash
RUN test -d node_modules || (echo "no cached modules" && npm ci --no-audit)
RUN npm run postinstall:default
RUN npm run build$BUILD_TARGET
# Serve Mute
FROM docker.io/nginx:alpine
LABEL maintainer="Baptiste Hubert <baptiste.hubert@inria.fr>"
LABEL org.opencontainers.title coast-team/mute
LABEL org.opencontainers.description a scalable collaborative document editor with CRDT, P2P and E2EE
LABEL org.opencontainers.authors https://github.com/coast-team/mute/graphs/contributors
LABEL org.opencontainers.source https://github.com/coast-team/mute
LABEL org.opencontainers.documentation https://github.com/coast-team/mute/wiki
LABEL org.opencontainers.image.vendor COAST
COPY conf/nginx/nginx.conf /etc/nginx/nginx.conf
COPY conf/nginx/nginx.ssl.conf /etc/nginx/nginx.ssl.conf
COPY conf/nginx/nginx.mimetypes.conf /etc/nginx/nginx.mimetypes.conf
COPY --from=builder /app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]