mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-31 11:09:41 +02:00
change default config name && some fixes
This commit is contained in:
parent
2663931f2a
commit
ecb27e7e45
8 changed files with 21 additions and 12 deletions
|
@ -18,7 +18,7 @@ yarn install
|
|||
### 3. Create separate config file for local overrides
|
||||
|
||||
```shell
|
||||
touch app-config.local.yaml
|
||||
touch docs-config.local.yaml
|
||||
```
|
||||
|
||||
### 4. Run the application
|
||||
|
@ -39,7 +39,7 @@ In order to use MongoDB, follow these steps:
|
|||
docker-compose up mongodb
|
||||
```
|
||||
|
||||
### 2. Setup MongoDB driver in app-config.local.yaml
|
||||
### 2. Setup MongoDB driver in docs-config.local.yaml
|
||||
|
||||
```yaml
|
||||
database:
|
||||
|
@ -73,7 +73,7 @@ By default, the application uses local filesystem to store files, but S3 driver
|
|||
### 1. Get credentials for S3 bucket
|
||||
Create a S3 bucket and get access key and secret key (or use existing ones)
|
||||
|
||||
### 2. Setup S3 driver in app-config.local.yaml
|
||||
### 2. Setup S3 driver in docs-config.local.yaml
|
||||
|
||||
```yaml
|
||||
uploads:
|
||||
|
|
|
@ -9,8 +9,8 @@ services:
|
|||
volumes:
|
||||
- ./public/uploads:/uploads
|
||||
- ./db:/usr/src/app/db
|
||||
- ./app-config.yaml:/usr/src/app/app-config.yaml
|
||||
- ./app-config.local.yaml:/usr/src/app/app-config.local.yaml
|
||||
- ./docs-config.yaml:/usr/src/app/docs-config.yaml
|
||||
- ./docs-config.local.yaml:/usr/src/app/docs-config.local.yaml
|
||||
mongodb:
|
||||
image: mongo:6.0.1
|
||||
ports:
|
||||
|
|
|
@ -32,4 +32,4 @@ COPY --from=build /usr/src/app/public ./public
|
|||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["node", "dist/bin/server.js"]
|
||||
CMD ["node", "dist/backend/server.js"]
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
"name": "codex.docs",
|
||||
"license": "Apache-2.0",
|
||||
"version": "0.0.1-alpha.5",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"codex.docs": "dist/backend/server.js"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 2 versions",
|
||||
"> 1%"
|
||||
|
@ -9,9 +13,10 @@
|
|||
"scripts": {
|
||||
"start": "concurrently \"yarn start-backend\" \"yarn build-frontend\"",
|
||||
"dev": "concurrently \"yarn start-backend\" \"yarn build-frontend:dev\"",
|
||||
"build-all": "yarn build-frontend && yarn build-backend",
|
||||
"build-static": "ts-node src/backend/build-static.ts",
|
||||
"start-backend": "cross-env NODE_ENV=development npx nodemon --config nodemon.json src/backend/server.ts -c app-config.yaml -c app-config.local.yaml",
|
||||
"compile": "tsc && copyfiles -u 3 ./src/**/*.twig ./dist/backend/views && copyfiles -u 1 ./src/**/*.svg ./dist/",
|
||||
"start-backend": "cross-env NODE_ENV=development npx nodemon --config nodemon.json src/backend/server.ts -c docs-config.yaml -c docs-config.local.yaml",
|
||||
"build-backend": "tsc && copyfiles -u 3 ./src/**/*.twig ./dist/backend/views && copyfiles -u 1 ./src/**/*.svg ./dist/",
|
||||
"build-frontend": "webpack --mode=production",
|
||||
"build-frontend:dev": "webpack --mode=development --watch",
|
||||
"test:js": "cross-env NODE_ENV=testing mocha --recursive ./dist/test --exit",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
|
|
@ -107,7 +107,7 @@ const args = arg({ /* eslint-disable @typescript-eslint/naming-convention */
|
|||
});
|
||||
|
||||
const cwd = process.cwd();
|
||||
const paths = (args['--config'] || [ './app-config.yaml' ]).map((configPath) => {
|
||||
const paths = (args['--config'] || [ './docs-config.yaml' ]).map((configPath) => {
|
||||
if (path.isAbsolute(configPath)) {
|
||||
return configPath;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
"outDir": "./dist/", /* Redirect output structure to the directory. */
|
||||
"outDir": "./dist/backend", /* Redirect output structure to the directory. */
|
||||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||
// "composite": true, /* Enable project compilation */
|
||||
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
||||
|
@ -74,12 +74,15 @@
|
|||
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
||||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"include": ["src/backend/**/*"],
|
||||
"ts-node": {
|
||||
/**
|
||||
* Tell ts-node CLI to install the --loader automatically, explained below
|
||||
* https://typestrong.org/ts-node/docs/imports/
|
||||
*/
|
||||
"esm": true
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"src/test/**/*"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue