-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) 路 950 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (26 loc) 路 950 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
31
32
33
34
# ==========================================
# STAGE 1: Build the frontend application
# ==========================================
FROM node:11 AS builder
WORKDIR /app
# Copy dependency files first to leverage Docker caching layers
COPY package.json yarn.lock ./
# Install dependencies strictly matching the lockfile
RUN yarn install --frozen-lockfile
# Copy the rest of the project source code
COPY .vuepress ./.vuepress
COPY eda ./eda
COPY http ./http
COPY img ./img
COPY sql ./sql
COPY components-overview.md installation.md README.md ./
# Compile and minify the static files for production
RUN yarn run build
# ==========================================
# STAGE 2: Serve the static files with Nginx
# ==========================================
FROM nginx:1.27.5-alpine-slim AS client
# Install curl (for heartbeats).
RUN apk add --no-cache curl
COPY --from=builder /app/.vuepress/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/