mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
Run Jami locally in Dev and CI enviroment
This commit is contained in:
@@ -62,6 +62,16 @@ services:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
image: registry.toska.cs.helsinki.fi/user-db
|
||||
|
||||
jami:
|
||||
<<: *defaults
|
||||
image: toska/jami
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=3003
|
||||
ports:
|
||||
- 3003:3003
|
||||
container_name: jami
|
||||
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
container_name: nginx
|
||||
|
||||
@@ -168,6 +168,16 @@ services:
|
||||
volumes:
|
||||
- user-db-data:/data
|
||||
|
||||
jami:
|
||||
<<: *defaults
|
||||
image: toska/jami
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- PORT=3003
|
||||
ports:
|
||||
- 3003:3003
|
||||
container_name: jami
|
||||
|
||||
volumes:
|
||||
backend-nodemod:
|
||||
frontend-nodemod:
|
||||
|
||||
@@ -16,6 +16,9 @@ const requiredGroup = isStaging
|
||||
// Pate
|
||||
const pateToken = process.env.PATE_API_TOKEN || ''
|
||||
|
||||
// Jami
|
||||
const jamiUrl = isDev ? 'http://jami:3003/' : 'https://importer.cs.helsinki.fi/api/auth'
|
||||
|
||||
// Importer client
|
||||
const importerToken = process.env.IMPORTER_DB_API_TOKEN || ''
|
||||
|
||||
@@ -79,6 +82,7 @@ module.exports = {
|
||||
sentryEnvironment,
|
||||
isProduction,
|
||||
pateToken,
|
||||
jamiUrl,
|
||||
baseUrl,
|
||||
frontUrl,
|
||||
backendPort,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
const axios = require('axios')
|
||||
const { importerToken } = require('../conf-backend')
|
||||
const { importerToken, jamiUrl } = require('../conf-backend')
|
||||
const logger = require('./logger')
|
||||
|
||||
const jamiClient = axios.create({
|
||||
params: {
|
||||
token: importerToken,
|
||||
},
|
||||
baseURL: 'https://importer.cs.helsinki.fi/api/auth',
|
||||
baseURL: jamiUrl,
|
||||
})
|
||||
|
||||
const getJamiClient = () => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const _ = require('lodash')
|
||||
const Sentry = require('@sentry/node')
|
||||
|
||||
const { runningInCI, isProduction } = require('../conf-backend')
|
||||
const { runningInCI } = require('../conf-backend')
|
||||
const logger = require('./logger')
|
||||
const { getJamiClient } = require('../util/jamiClient')
|
||||
const jamiClient = getJamiClient()
|
||||
@@ -14,7 +14,6 @@ const getIAMAccessFromJami = async (user, attempt = 1) => {
|
||||
const { data: iamAccess } = await jamiClient.post('/', {
|
||||
userId,
|
||||
iamGroups,
|
||||
noLogging: !isProduction,
|
||||
})
|
||||
|
||||
return iamAccess
|
||||
|
||||
Reference in New Issue
Block a user