Skip to content

Commit

Permalink
Merge pull request #320 from SciCatProject/SWAP-3202-scicat-fe-invest…
Browse files Browse the repository at this point in the history
…igate-why-logbook-under-proposal

fix: save synapse token in memory instead of mongoDB
  • Loading branch information
Junjiequan authored Sep 20, 2023
2 parents 3873900 + ac0be9d commit 3cf325f
Show file tree
Hide file tree
Showing 39 changed files with 141 additions and 1,403 deletions.
11 changes: 1 addition & 10 deletions CI/ESS/.env
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
JWT_SECRET = "myjwts3cr3t"
JWT_EXPIRES_IN = "21600"
MONGODB_HOST="mongodb"
MONGODB_PORT=27017
MONGODB_DB_NAME="scichat"
MONGODB_USER=""
MONGODB_PASSWORD=""
PORT=3030
RABBITMQ_ENABLED="no"
RABBITMQ_HOST="localhost"
RABBITMQ_USER="rabbitmq"
RABBITMQ_PASSWORD="rabbitmq"
DEFAULT_PASSWORD="DefaultPasswordGoesHere"
SCICHAT_USER="testUser"
SCICHAT_PASSWORD="password"
SYNAPSE_SERVER_NAME="ess"
SYNAPSE_SERVER_HOST="https://scitest.esss.lu.se"
SYNAPSE_SERVER_HOST="https://server-scichat.swap.ess.eu"
SYNAPSE_BOT_NAME="BotNameGoesHere"
SYNAPSE_BOT_PASSWORD="BotPasswordGoesHere"

13 changes: 1 addition & 12 deletions CI/ESS/docker-compose.test.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
version: "3.2"
services:
mongodb:
image: "bitnami/mongodb:latest"
volumes:
- "mongodb_data:/bitnami"

scichat-loopback:
build:
context: .
dockerfile: CI/ESS/Dockerfile.test
environment:
- SYNAPSE_BOT_NAME
- SYNAPSE_BOT_PASSWORD
depends_on:
- mongodb
volumes:
mongodb_data:
driver: local
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,24 @@

Loopback API for communication between SciChat and Catamel.


## Get started

1. `git clone https://github.com/SciCatProject/scichat-loopback.git`
2. `npm install`
3. Add *.env* file to project root folder. See [Environment Variables](#environment-variables).
3. Add _.env_ file to project root folder. See [Environment Variables](#environment-variables).
4. `npm start`


## Test the app

`npm run test`


## Environment Variables

Valid environment variables for the *.env* file.
Valid environment variables for the _.env_ file.

### SciChat-LoopBack

- `JWT_SECRET` [string] The secret for your JWT token, used for authorization.
- `JWT_EXPIRES_IN` [string] How long, in seconds, the JWT token is valid.
- `PORT` [number] The port that this service should be exposed on. Defaults to `3000` if value is not set.
- `SCICHAT_USER` [string] The username of the user for this service. The app will create a user account with this username if this is the first time you run the app. If this is value is not set, the app will not start.
- `SCICHAT_PASSWORD` [string] The password of the user for this service. The app will create a user account with this password if this is the first time you run the app.

### MongoDB

- `MONGODB_HOST` [string] The hostname/URL of your MongoDB.
- `MONGODB_PORT` [number] The port used to access MongoDB.
- `MONGODB_DB_NAME` [string] The name of the database where data from the app is stored.
- `MONGODB_USER` [string] Username for the MongoDB user. Leave out or set to empty string if you don't have MongoDB authorization set up.
- `MONGODB_PASSWORD` [string] Password for the MongoDB user. Leave out or set to empty string if you don't have MongoDB authorization set up.

### RabbitMQ

Expand Down
Loading

0 comments on commit 3cf325f

Please sign in to comment.