Added better prod script
This commit is contained in:
parent
89f79cb7d5
commit
87a2ca1bc3
|
@ -9,8 +9,7 @@ services:
|
||||||
- .:/home/node/app
|
- .:/home/node/app
|
||||||
- node_modules:/home/node/app/node_modules
|
- node_modules:/home/node/app/node_modules
|
||||||
working_dir: /home/node/app/
|
working_dir: /home/node/app/
|
||||||
# command: sh -c "npm install && npm run generate:types && npm run dev"
|
command: sh -c "npm run prod"
|
||||||
command: sh -c "npm install && npm run generate:types && npm run build && npm run serve"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- mongo
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -12,14 +12,12 @@
|
||||||
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js",
|
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js",
|
||||||
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/ && copyfiles -u 1 \"src/sdk.ts\" dist/ && copyfiles -u 1 \"src/constants.ts\" dist/ && copyfiles -u 1 \"src/types/collections.ts\" dist/",
|
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/ && copyfiles -u 1 \"src/sdk.ts\" dist/ && copyfiles -u 1 \"src/constants.ts\" dist/ && copyfiles -u 1 \"src/types/collections.ts\" dist/",
|
||||||
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
|
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
|
||||||
"generate:graphQLSchema": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema",
|
|
||||||
"unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport='src/payload.config.ts;src/constants.ts;src/sdk.ts;src/types/collections.ts'",
|
"unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport='src/payload.config.ts;src/constants.ts;src/sdk.ts;src/types/collections.ts'",
|
||||||
"prettier": "prettier --list-different --end-of-line auto --write src",
|
"prettier": "prettier --list-different --end-of-line auto --write src",
|
||||||
"tsc": "tsc --noEmit",
|
"tsc": "tsc --noEmit",
|
||||||
"precommit": "npm run generate:types && npm run prettier && npm run unused-exports && npm run tsc",
|
"precommit": "npm run generate:types && npm run prettier && npm run unused-exports && npm run tsc",
|
||||||
"upgrade": "ncu",
|
"upgrade": "ncu",
|
||||||
"clean": "sudo rm -r uploads mongo",
|
"prod": "rm -rf build && rm -rf dist && npm ci && npm run precommit && npm run build && npm run serve"
|
||||||
"start": "npm install && npm run generate:types && npm run dev"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/vollkorn": "5.0.19",
|
"@fontsource/vollkorn": "5.0.19",
|
||||||
|
|
Loading…
Reference in New Issue