add deps for serve

This commit is contained in:
burnettk 2023-01-30 22:35:24 -05:00
parent 4c47f0b711
commit cce1a2246c
3 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1 @@
/node_modules

View File

@ -12,6 +12,12 @@ FROM base AS setup
COPY . /app/ COPY . /app/
RUN cp /app/package.json /app/package.json.bak
ADD package.justserve.json /app/package.json
RUN npm ci --ignore-scripts
RUN cp -r /app/node_modules /app/node_modules.justserve
RUN cp /app/package.json.bak /app/package.json
# npm ci because it respects the lock file. # npm ci because it respects the lock file.
# --ignore-scripts because authors can do bad things in postinstall scripts. # --ignore-scripts because authors can do bad things in postinstall scripts.
# https://cheatsheetseries.owasp.org/cheatsheets/NPM_Security_Cheat_Sheet.html # https://cheatsheetseries.owasp.org/cheatsheets/NPM_Security_Cheat_Sheet.html
@ -31,5 +37,6 @@ ENV PORT0=7001
COPY --from=setup /app/build /app/build COPY --from=setup /app/build /app/build
COPY --from=setup /app/bin /app/bin COPY --from=setup /app/bin /app/bin
COPY --from=setup /app/node_modules.justserve /app/node_modules
ENTRYPOINT ["/app/bin/boot_server_in_docker"] ENTRYPOINT ["/app/bin/boot_server_in_docker"]

View File

@ -0,0 +1,36 @@
{
"name": "spiffworkflow-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"serve": "^14.0.0"
},
"scripts": {
"start": "ESLINT_NO_DEV_ERRORS=true PORT=7001 craco start",
"build": "craco build",
"test": "react-scripts test --coverage",
"t": "npm test -- --watchAll=false",
"eject": "craco eject",
"format": "prettier --write src/**/*.[tj]s{,x}",
"lint": "./node_modules/.bin/eslint src",
"lint:fix": "./node_modules/.bin/eslint --fix src"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}