diff --git a/apps/agora/api/.env.example b/apps/agora/api/.env.example index e0c94ffc5..629f369b4 100644 --- a/apps/agora/api/.env.example +++ b/apps/agora/api/.env.example @@ -1,2 +1,4 @@ -MONGODB_URI="mongodb://root:changeme@agora-mongo:27017/agora?authSource=admin" +MONGODB_PASS="changeme" +MONGODB_USER="root" +MONGODB_HOST="agora-mongo" NODE_ENV="development" \ No newline at end of file diff --git a/apps/agora/api/src/api.ts b/apps/agora/api/src/api.ts index f1ff703a9..61944581f 100644 --- a/apps/agora/api/src/api.ts +++ b/apps/agora/api/src/api.ts @@ -14,13 +14,27 @@ import { teamsRoute, } from './components'; -const mongoUri = process.env.MONGODB_URI; +const mongodbUser = process.env.MONGODB_USER; +const mongodbPass = process.env.MONGODB_PASS; +const mongodbHost = process.env.MONGODB_HOST; -if (!mongoUri) { - console.error('No MONGODB_URI environment variable has been defined.'); +if (!mongodbUser) { + console.error('No MONGODB_USER environment variable has been defined.'); process.exit(1); } +if (!mongodbPass) { + console.error('No MONGODB_PASS environment variable has been defined.'); + process.exit(1); +} + +if (!mongodbHost) { + console.error('No MONGODB_HOST environment variable has been defined.'); + process.exit(1); +} + +const mongoUri = `mongodb://${mongodbUser}:${mongodbPass}@${mongodbHost}:27017/agora?authSource=admin`; + mongoose .connect(mongoUri) .then(() => console.log('Connected to MongoDB')) diff --git a/apps/agora/app/src/config/config.json b/apps/agora/app/src/config/config.json index 966efbcbb..a13f16c93 100644 --- a/apps/agora/app/src/config/config.json +++ b/apps/agora/app/src/config/config.json @@ -4,5 +4,5 @@ "csrApiUrl": "http://localhost:3333/v1", "ssrApiUrl": "http://agora-api:3333/v1", "rollbarToken": "e788198867474855a996485580b08d03", - "tagName": "agora/v0.0.2" + "tagName": "agora/v4.0.0-rc1" }