rework PR remarks

This commit is contained in:
Claus-Peter Hübner 2022-09-22 23:29:51 +02:00
parent fa76bd68a1
commit de234cc7df
6 changed files with 9 additions and 18 deletions

View File

@ -38,7 +38,7 @@ LOGIN_SERVER_KEY=a51ef8ac7ef1abf162fb7a65261acd7a
# EMail
EMAIL=false
EMAIL_TEST_MODUS=false
EMAIL_TEST_RECEIVER=test_team@gradido.net
EMAIL_TEST_RECEIVER=stage1@gradido.net
EMAIL_USERNAME=gradido_email
EMAIL_SENDER=info@gradido.net
EMAIL_PASSWORD=xxx

View File

@ -5,7 +5,6 @@ JWT_SECRET=$JWT_SECRET
JWT_EXPIRES_IN=$JWT_EXPIRES_IN
GRAPHIQL=false
GDT_API_URL=$GDT_API_URL
ENV_NAME=$ENV_NAME
# Database
DB_HOST=localhost

View File

@ -28,7 +28,6 @@ const server = {
JWT_EXPIRES_IN: process.env.JWT_EXPIRES_IN || '10m',
GRAPHIQL: process.env.GRAPHIQL === 'true' || false,
GDT_API_URL: process.env.GDT_API_URL || 'https://gdt.gradido.net',
ENV_NAME: process.env.NODE_ENV || 'production',
PRODUCTION: process.env.NODE_ENV === 'production' || false,
}
@ -69,7 +68,7 @@ const loginServer = {
const email = {
EMAIL: process.env.EMAIL === 'true' || false,
EMAIL_TEST_MODUS: process.env.EMAIL_TEST_MODUS === 'true' || 'false',
EMAIL_TEST_RECEIVER: process.env.EMAIL_TEST_RECEIVER || 'test_team@gradido.net',
EMAIL_TEST_RECEIVER: process.env.EMAIL_TEST_RECEIVER || 'stage1@gradido.net',
EMAIL_USERNAME: process.env.EMAIL_USERNAME || 'gradido_email',
EMAIL_SENDER: process.env.EMAIL_SENDER || 'info@gradido.net',
EMAIL_PASSWORD: process.env.EMAIL_PASSWORD || 'xxx',

View File

@ -76,12 +76,8 @@ const createServer = async (
})
apollo.applyMiddleware({ app, path: '/' })
logger.info(
`running in GRADIDO_ENV_NAME=${CONFIG.ENV_NAME} as PRODUCTION=${CONFIG.PRODUCTION} and EMAIL_TEST_MODUS=${CONFIG.EMAIL_TEST_MODUS} ...`,
`running with PRODUCTION=${CONFIG.PRODUCTION}, sending EMAIL enabled=${CONFIG.EMAIL} and EMAIL_TEST_MODUS=${CONFIG.EMAIL_TEST_MODUS} ...`,
)
if (CONFIG.PRODUCTION && CONFIG.EMAIL_TEST_MODUS === 'true') {
logger.error(`### RUNNING ENVIRONMENT Production IN EMAIL_TEST_MODE IS NOT ALLOWED ###`)
throw new Error(`### RUNNING ENVIRONMENT Production IN EMAIL_TEST_MODE IS NOT ALLOWED ###`)
}
logger.debug('createServer...successful')
return { apollo, app, con }
}

View File

@ -95,9 +95,6 @@
> cp .env.dist .env
> nano .env
>> Adjust values accordingly
# Define name of gradido environment
> the env variable GRADIDO_ENV_NAME have to be set during system installation manually to "development, stage1, stage2, stage3, production"
> export GRADIDO_ENV_NAME=development
# Define cronjob to compensate yarn output in /tmp
> yarn creates output in /tmp directory, which must be deleted regularly and will be done per cronjob
> on stage1 a hourly job is necessary by setting the following job in the crontab for the gradido user

View File

@ -120,8 +120,8 @@ yarn build
if [ "$DEPLOY_SEED_DATA" = "true" ]; then
yarn seed
fi
# the env variable GRADIDO_ENV_NAME have to be set during system installation manually (development, stage1, stage2, stage3) if it should differ from production
export NODE_ENV="${GRADIDO_ENV_NAME:=production}"
# TODO maybe handle this differently?
export NODE_ENV=production
pm2 delete gradido-backend
pm2 start --name gradido-backend "yarn --cwd $PROJECT_ROOT/backend start" -l $GRADIDO_LOG_PATH/pm2.backend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
pm2 save
@ -133,8 +133,8 @@ cd $PROJECT_ROOT/frontend
unset NODE_ENV
yarn install
yarn build
# the env variable GRADIDO_ENV_NAME have to be set during system installation manually (development, stage1, stage2, stage3) if it should differ from production
export NODE_ENV="${GRADIDO_ENV_NAME:=production}"
# TODO maybe handle this differently?
export NODE_ENV=production
pm2 delete gradido-frontend
pm2 start --name gradido-frontend "yarn --cwd $PROJECT_ROOT/frontend start" -l $GRADIDO_LOG_PATH/pm2.frontend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
pm2 save
@ -146,8 +146,8 @@ cd $PROJECT_ROOT/admin
unset NODE_ENV
yarn install
yarn build
# the env variable GRADIDO_ENV_NAME have to be set during system installation manually (development, stage1, stage2, stage3) if it should differ from production
export NODE_ENV="${GRADIDO_ENV_NAME:=production}"
# TODO maybe handle this differently?
export NODE_ENV=production
pm2 delete gradido-admin
pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start" -l $GRADIDO_LOG_PATH/pm2.admin.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
pm2 save