Browse Source

dockerized app

readme
Mayank 4 years ago
parent
commit
3f53c38203
No known key found for this signature in database GPG Key ID: D037D60476CE748C
  1. 31
      Dockerfile

31
Dockerfile

@ -0,0 +1,31 @@
FROM node:12.16.3-alpine
# install simple http server for serving static content
RUN yarn global add http-server
# make the 'app' folder the current working directory
WORKDIR /app
# copy 'package.json'
COPY package.json ./
# copy 'yarn.lock'
COPY yarn.lock ./
# install dependencies
RUN yarn
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# Set staging env variable if building for testnet.getumbrel.com
# ENV STAGING_DEPLOYMENT=true
# build app for production
RUN yarn build
# copy index.html to 404.html as http-server serves 404.html on all non "/" routes
RUN cp ./dist/index.html ./dist/404.html
EXPOSE 3004
CMD [ "http-server", "-p 3004", "dist" ]
Loading…
Cancel
Save