Skip to content

Commit

Permalink
Fixes to creete environment
Browse files Browse the repository at this point in the history
  • Loading branch information
euanmillar committed Dec 7, 2023
1 parent f0c2cf5 commit 51165a5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions infrastructure/create-github-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const config = {
INFOBIP_SENDER_ID: process.env.INFOBIP_SENDER_ID || '' // the name of the SMS sender e.g. OpenCRVS
},
seeding: {
ACTIVATE_USERS: true,
ACTIVATE_USERS: 'true',
AUTH_HOST: 'https://auth.opencrvs.africa.cmu.edu',
COUNTRY_CONFIG_HOST: 'https://countryconfig.opencrvs.africa.cmu.edu',
GATEWAY_HOST: 'https://gateway.opencrvs.africa.cmu.edu'
Expand Down Expand Up @@ -178,7 +178,7 @@ async function main() {
}
}

const SECRETS = {
const SECRETS_TO_SAVE_IN_PASSWORD_MANAGER = {
ELASTICSEARCH_SUPERUSER_PASSWORD: generateLongPassword(),
ENCRYPTION_KEY: generateLongPassword(),
KIBANA_USERNAME: 'opencrvs-admin',
Expand All @@ -187,10 +187,14 @@ async function main() {
MINIO_ROOT_USER: generateLongPassword(),
MONGODB_ADMIN_PASSWORD: generateLongPassword(),
MONGODB_ADMIN_USER: generateLongPassword(),
SUPER_USER_PASSWORD: generateLongPassword(),
SUPER_USER_PASSWORD: generateLongPassword()
}

const SECRETS = {
DOCKERHUB_ACCOUNT: config.repo.DOCKERHUB_ACCOUNT,
DOCKERHUB_REPO: config.repo.DOCKERHUB_REPO,
DOCKER_TOKEN: config.repo.DOCKER_TOKEN,
...SECRETS_TO_SAVE_IN_PASSWORD_MANAGER,
...config.ssh,
...config.smtp,
...config.services,
Expand All @@ -204,8 +208,8 @@ async function main() {
...backupVariables
}
writeFileSync(
'./.secrets/' + config.environment + '.json',
JSON.stringify([SECRETS, VARIABLES], null, 2)
'../.secrets/' + config.environment + '.json',
JSON.stringify([SECRETS_TO_SAVE_IN_PASSWORD_MANAGER], null, 2)
)
if (process.argv.includes('--dry-run')) {
console.log('Dry run. Not creating secrets or variables.')
Expand Down

0 comments on commit 51165a5

Please sign in to comment.