j40-cejst-2/client/Dockerfile
Vim 704831159f
dockerize front-end and pass env vars to npm build (#614)
* Revert "dockerize front end (#558)"

This reverts commit 89c23faf7a.

* dockerize frontend
- adds score server and website docker compose
- creates docker ignore
- adds .env.* for dev, prod and local
- adds dockerfile for website
- adds env to gatsby-config
- adds hostaddress to develop / start script
- adds istructions in README for running docker
- replaces fixed URLS with ones based on env vars
- creates a score server dockerfile

* updates README to change map tiles source

* adds env DATA_SOURCE:development to deploy GHA

* capitalize readme
2021-09-07 10:35:11 -07:00

22 lines
643 B
Docker

FROM node:14
# Set working directory like 'cd' command, any subsequent instructions in this docker file, will start from
# this working directory
WORKDIR /client
# Copy the package.json and package_lock.json files from local to the docker image / container
COPY package*.json ./
# install all packages as a layer in the docker image / container
RUN npm install
# copy all local files from the working directory to the docker image/container however we must use
# dockerignore to ignore node_modules so that the image can use what what was just installed from the above
# step.
COPY . .
ENV PORT=6000
EXPOSE 6000
CMD [ "npm", "start"]