forked from unchained-capital/caravan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (19 loc) · 781 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM node:16-buster-slim AS builder
# Install all OS dependencies
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update --yes && \
apt-get upgrade --yes && \
apt-get install --yes --no-install-recommends \
build-essential
# Copy over required files for build
WORKDIR /var/app
COPY fixtures /var/app/fixtures
COPY public /var/app/public
COPY src /var/app/src
COPY babel.config.json jest.config.json vite.config.ts tsconfig.json tsconfig.node.json .env vite-env.d.ts .eslintignore .eslintrc package-lock.json index.html package.json /var/app/
# Build the app
RUN npm install
RUN npm run build
# Serve the production build files via nginx (will be served at http://localhost:80/caravan)
FROM nginx:1.23
COPY --from=builder /var/app/build /usr/share/nginx/html/caravan