Skip to content

Commit

Permalink
Update README.md and enhanced env variable examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaei2000 authored Oct 2, 2024
1 parent 4616299 commit f112df3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ git clone --recurse-submodules [email protected]:mdenet/educationplatform-docker.gi

> Note that for ssh access you must [configure](https://docs.github.com/en/authentication/connecting-to-github-with-ssh) your account with a key.
## Specify .env
## Environment Variables

The ```env.example``` file lists variables (equally listed below) that need to be specified before building the platform. Those variables specify a base URL for the platform and a few extensions.
Before building the platform the ```env.example``` file should be renamed to ```.env``` and the environment variables listed below must be populated with relevant values listed below.

The ```.env``` file contains URLs for running the platform on https://mdenet-dev.sites.er.kcl.ac.uk (the base URL in this case). When deploying the platform on a new server/with a new website, those variables will need to be changed.
+ **TRUSTED_ORIGINS** comma delimited whitelist of base URLs (with no trailing slash) for CORS aware endpoints
+ **ES_DEPLOY_ADDRESS** base URL + /tools/xtext/editors
+ **ES_ADDRESS** base URL + /tools/xtext/project

Here is an example of the ```.env``` file provided that the base URl of the platform server is https://ep.mde-network.org:

```
TRUSTED_ORIGINS=[insert base URL, e. g., https://mdenet-dev.sites.er.kcl.ac.uk]
ES_DEPLOY_ADDRESS=[insert base URL + /tools/xtext/editors]
ES_ADDRESS=[insert base URL + /tools/xtext/project]
TRUSTED_ORIGINS=https://ep.mde-network.org
ES_DEPLOY_ADDRESS=https://ep.mde-network.org/tools/xtext/editors
ES_ADDRESS=https://ep.mde-network.org/tools/xtext/project
```

## Build and run the docker image
Expand Down

0 comments on commit f112df3

Please sign in to comment.