mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-10-01 03:13:17 -07:00
dockerize front end (#558)
* initial docker * adds concurrency to be able to run yarn install * adds 0.0.0.0 to allow docker access * adds web service * adds env variables * updates root path * adds volumes * adds docker to readme * adds score server client docker * docker updates after convo * speeds up build and removes env vars * adds client as volume * updates to docker setup * checkpoint * updates the docker file * adds .env.* files * replaces serve with http-server for cors Co-authored-by: Jorge Escobar <jorge.e.escobar@omb.eop.gov>
This commit is contained in:
parent
fba3090d36
commit
89c23faf7a
11 changed files with 113 additions and 30 deletions
22
client/Dockerfile
Normal file
22
client/Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
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"]
|
Loading…
Add table
Add a link
Reference in a new issue