Merge pull request #119 from sartography/feature/docker-with-serve
add deps for serve
This commit is contained in:
commit
751ba38e05
|
@ -0,0 +1 @@
|
||||||
|
/node_modules
|
|
@ -12,6 +12,12 @@ FROM base AS setup
|
||||||
|
|
||||||
COPY . /app/
|
COPY . /app/
|
||||||
|
|
||||||
|
RUN cp /app/package.json /app/package.json.bak
|
||||||
|
ADD justservewebserver.package.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"]
|
||||||
|
|
|
@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue