forked from preston/cql-studio
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 788 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 788 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
FROM node:25-alpine AS builder
LABEL maintainer="preston.lee@prestonlee.com"
# Install dependencies first so they layer can be cached across builds.
RUN mkdir /app
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm i
# Build
COPY . .
RUN npm run ng build --production
# -- --prod
FROM nginx:stable-alpine
# We need to make a few changes to the default configuration file.
COPY nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html
# Remove any default nginx content
RUN rm -rf *
# Copy build from "builder" stage, as well as runtime configuration script public folder
COPY --from=builder /app/dist/cql-studio/browser .
# CMD ["./configure-from-environment.sh", "&&", "exec", "nginx", "-g", "'daemon off;'"]
COPY entrypoint.sh .
CMD ["./entrypoint.sh"]