forked from cmmcleod/coriolis
-
Notifications
You must be signed in to change notification settings - Fork 83
/
Dockerfile-local-prod
32 lines (25 loc) · 1.19 KB
/
Dockerfile-local-prod
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
#syntax=docker/dockerfile:1.4
# Run this from within this directory. Change the location of coriolis-data repo and image name/tag as needed.
# docker buildx build --build-context data=../coriolis-data --tag coriolis:0.0.7-local-prod -f Dockerfile-local-prod .
# docker run -d -p 80:8080 coriolis:0.0.7-local-prod
FROM node:18-alpine
# TODO: For a production build, we may want to just build the bundle and copy that in. No need for local copy of source.
WORKDIR /app
ADD . .
# COPY --from=data . /coriolis-data/
# Git is required before install if any modules (like coriolis-data is now referenced in the package.json) are loaded from github
RUN apk update
RUN apk add git
# WORKDIR /app/coriolis-data
# RUN npm install
# WORKDIR /app
# RUN npm install
# Bundle for production config with webpack & log
# In this version of the dockerfile, I'm deferring automated webpack build so I can monitor a manual build
# RUN npm run build > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)
RUN npm install -g http-server
# Optimally, this will start a static asset server like nginx/apache. Currently, this will start dev webpack server.
# CMD ["http-server", "/app/build", "-c-1"]
CMD ["/bin/ash"]
# CMD [""]
EXPOSE 8080