mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-23 01:27:14 +02:00
adding config only mode
This commit is contained in:
parent
2ac0eaa57a
commit
2757af6bf0
@ -94,8 +94,9 @@ You can set up the app the following ways:
|
|||||||
* Using the UI
|
* Using the UI
|
||||||
* Manually editing the `config.json`
|
* Manually editing the `config.json`
|
||||||
* Through switches
|
* Through switches
|
||||||
* Like: `node backend/index.js --Server-port=3000 --Client-authenticationRequired=false`
|
* Like: `node start -- --Server-port=3000 --Client-authenticationRequired=false`
|
||||||
* You can check the generated `config.json` for the config hierarchy
|
* You can check the generated `config.json` for the config hierarchy
|
||||||
|
* Note: you can run the app to generate the config file only, by running `npm start -- --config-only`
|
||||||
* Through environmental variable
|
* Through environmental variable
|
||||||
* like set env. variable `Server-port` to `3000`
|
* like set env. variable `Server-port` to `3000`
|
||||||
|
|
||||||
@ -122,7 +123,7 @@ apt-get install build-essential libkrb5-dev gcc g++
|
|||||||
```bash
|
```bash
|
||||||
npm run add-translation -- --fr
|
npm run add-translation -- --fr
|
||||||
```
|
```
|
||||||
it creates a new `messages.fr.xls` file at `frontend/translate` folder,
|
it creates a new `messages.fr.xls` file at `src/frontend/translate` folder,
|
||||||
it will already contain dummy translation with google translate.
|
it will already contain dummy translation with google translate.
|
||||||
3. 'fix' the dummy translation
|
3. 'fix' the dummy translation
|
||||||
4. test if it works:
|
4. test if it works:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
FROM arm32v7/node:10-stretch
|
FROM arm32v7/node:10-stretch
|
||||||
LABEL maintainer="Patrik J. Braun"
|
LABEL maintainer="Patrik J. Braun"
|
||||||
|
# build tutorial: https://collabnix.com/building-arm-based-docker-images-on-docker-desktop-made-possible-using-buildx/
|
||||||
|
|
||||||
RUN git clone https://github.com/bpatrik/pigallery2.git && \
|
RUN git clone https://github.com/bpatrik/pigallery2.git && \
|
||||||
cd /pigallery2 && \
|
cd /pigallery2 && \
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
"build-backend": "tsc",
|
"build-backend": "tsc",
|
||||||
"pretest": "tsc",
|
"pretest": "tsc",
|
||||||
"test": "ng test && mocha --recursive test/backend/unit && mocha --recursive test/backend/integration && mocha --recursive test/common/unit ",
|
"test": "ng test && mocha --recursive test/backend/unit && mocha --recursive test/backend/integration && mocha --recursive test/common/unit ",
|
||||||
"start": "node ./backend/index",
|
"start": "node ./src/backend/index",
|
||||||
"run-dev": "ng build --aot --watch --output-path=./dist --i18n-locale en --i18n-file src/frontend/translate/messages.en.xlf --i18n-missing-translation warning",
|
"run-dev": "ng build --aot --watch --output-path=./dist --i18n-locale en --i18n-file src/frontend/translate/messages.en.xlf --i18n-missing-translation warning",
|
||||||
"build-stats": "ng build --aot --prod --stats-json --output-path=./dist --i18n-locale en --i18n-file src/frontend/translate/messages.en.xlf --i18n-missing-translation warning",
|
"build-stats": "ng build --aot --prod --stats-json --output-path=./dist --i18n-locale en --i18n-file src/frontend/translate/messages.en.xlf --i18n-missing-translation warning",
|
||||||
"merge-new-translation": "gulp merge-new-translation",
|
"merge-new-translation": "gulp merge-new-translation",
|
||||||
|
@ -32,6 +32,11 @@ export class ConfigClass extends PrivateConfigDefaultsClass implements IPrivateC
|
|||||||
['MYSQL_DATABASE', 'Server-Database-mysql-database']]);
|
['MYSQL_DATABASE', 'Server-Database-mysql-database']]);
|
||||||
this.removeComment();
|
this.removeComment();
|
||||||
|
|
||||||
|
if (process.argv.indexOf('--config-only')) {
|
||||||
|
console.log('started with \'--config-only\' flag. Saving config and exiting.');
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
|
||||||
if (Utils.enumToArray(UserRoles).map(r => r.key).indexOf(this.Client.unAuthenticatedUserRole) === -1) {
|
if (Utils.enumToArray(UserRoles).map(r => r.key).indexOf(this.Client.unAuthenticatedUserRole) === -1) {
|
||||||
throw new Error('Unknown user role for Client.unAuthenticatedUserRole, found: ' + this.Client.unAuthenticatedUserRole);
|
throw new Error('Unknown user role for Client.unAuthenticatedUserRole, found: ' + this.Client.unAuthenticatedUserRole);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user