-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
31 lines (21 loc) · 1.06 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
# ---------------------------------------------------------------------------- #
# Build stage #
# ---------------------------------------------------------------------------- #
FROM node:19.8.1-alpine3.17 AS build
# --------------------------------- Arguments -------------------------------- #
ARG GITHUB_TOKEN
ARG ENVIRONMENT=prod
ENV GITHUB_TOKEN=${GITHUB_TOKEN}
# -------------------- Install and cache app dependencies -------------------- #
WORKDIR /app
COPY package.json package-lock.json .npmrc ./
RUN npm ci
# --------------------------------- Build app -------------------------------- #
COPY . .
RUN npm run build:${ENVIRONMENT}
# ---------------------------------------------------------------------------- #
# Final stage #
# ---------------------------------------------------------------------------- #
FROM joseluisq/static-web-server:2.15.0 as release
ENV SERVER_FALLBACK_PAGE=/public/index.html
COPY --from=build /app/dist /public