-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base URL Fixes #63
Open
aryaei2000
wants to merge
14
commits into
main
Choose a base branch
from
development_server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Base URL Fixes #63
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0b164ce
Added .gitignore
aryaei2000 deda759
Added .DS_Store
aryaei2000 80c89ef
Created example dotenv
aryaei2000 67878a3
Fix: Added environment variables to mdenet-tool-xtext
aryaei2000 4616299
update README to incorporate .env file
nadinespy f112df3
Update README.md and enhanced env variable examples
aryaei2000 eefb0e4
Delete .env
aryaei2000 80af699
Added image name for mdenet-service-discovery
aryaei2000 2cedbf8
Fixed mdenet-service-discovery dockerfile path.
aryaei2000 8c8333d
Added section for load balancer deployment.
aryaei2000 1cf73f7
Update docker-compose.yml
aryaei2000 27e76fb
Prepare the env file
aryaei2000 2193dbc
Deleted service discovery.
aryaei2000 086d5da
Removed platform from xtext service.
aryaei2000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.env | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,22 @@ 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. | ||
|
||
## Environment Variables | ||
|
||
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. | ||
|
||
+ **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=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 | ||
This builds the docker images and starts the platform servers. | ||
``` | ||
|
@@ -94,3 +110,10 @@ chmod -R 755 {public,educationplatform-examples} | |
## Stopping the platform | ||
|
||
To safely stop the platform use `ctrl-c` in the terminal running the platform. | ||
|
||
|
||
## Deployment on a Server Behind a Load Balancer | ||
|
||
It is quite common to have a web server running behind a firewall or load balancer. In this scenario, the public IP of the server or the FQDN can only be accessed on either port 443 (HTTPS) or 80 (HTTP). Therefore, it is not possible to interact with containers that run on other ports of the server directly. | ||
|
||
The containerised version of the platform can be deployed on a web server behind a load balancer using reverse proxy. For instance, an Nginx server can be configured to directly run on the host machine and map URL segments to ports so that each request is routed to the right container. | ||
aryaei2000 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TS_PORT=10000 | ||
ES_DEPLOY_ADDRESS= | ||
TRUSTED_ORIGINS= | ||
ES_ADDRESS= |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to explain why this is needed. Why not, instead, simply have a
BASE_URL
variable and compute the rest from there?