forked from OpenSlides/openslides-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (44 loc) · 1.31 KB
/
Copy pathDockerfile
File metadata and controls
62 lines (44 loc) · 1.31 KB
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
61
62
FROM node:24.14-alpine AS base
## Setup
ARG CONTEXT
ENV NODE_VERSION=24.10.14
ENV APP_CONTEXT=${CONTEXT}
## Packages
COPY packages /packages
WORKDIR /packages/openslides-motion-diff
RUN npm ci && \
npm run build
## Installs
WORKDIR /app
COPY client/package.json .
COPY client/package-lock.json .
RUN npm ci
COPY client ./
## Command
COPY ./dev/command.sh ./
RUN chmod +x command.sh
CMD ["./command.sh"]
# Development Image
FROM base AS dev
COPY ./meta ./meta
RUN apk add --no-cache git
# Testing Image
FROM dev AS tests
# Production Image
FROM base AS build
ARG VERSION=dev
RUN [ -n "$VERSION" ] && echo "$VERSION ($(date +%Y-%m-%d))" >src/assets/version.txt || true
# compile the angular project
RUN npm run build
# Prod wants nginx as base image for some reason
FROM nginx:1.28.2 AS prod
## Setup
ARG CONTEXT
ENV APP_CONTEXT=prod
# User is given by nginx image
LABEL org.opencontainers.image.title="OpenSlides Client"
LABEL org.opencontainers.image.description="Web client for OpenSlides which serves as the users main interaction point while using the OpenSlides system. "
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/openslides-client"
COPY --from=build /app/dist/client/browser /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/nginx.conf