forked from unchained-capital/caravan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (20 loc) · 710 Bytes
/
Dockerfile
File metadata and controls
24 lines (20 loc) · 710 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
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 config /var/app/config
COPY fixtures /var/app/fixtures
COPY public /var/app/public
COPY src /var/app/src
COPY .babelrc .env .eslintignore .eslintrc package-lock.json 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