forked from StanfordBDHG/ENGAGE-HF-Web-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 758 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 758 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
#
# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
# Based on the docker file found at https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile.
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
FROM node:22 AS build
RUN mkdir /app
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
FROM nginx:stable-alpine
RUN mkdir -p /var/www
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
# https://github.com/garronej/vite-envs
# enable env var configuration
ENTRYPOINT ["sh", "-c", "/usr/share/nginx/html/vite-envs.sh && nginx -g 'daemon off;'"]