Commit 0180fdfd authored by PkSM3's avatar PkSM3

remote deployment requires nginx reverse proxy for doors server for the ajax to workgit add -u

parent d0058365
#### Why and what?
After comex-reg setup, one may want to run a doors server to interact with.
1) To do that we need to install doors
2) Doors is served by a jetty server so we need to do a few things
## Doors installation
First you'll need to install sbt (for scala builds): see http://www.scala-sbt.org/
```bash
# any installation dir is ok...
cd /~
git clone https://github.com/ISCPIF/doors.git
cd doors/application
sbt
```
Then we build and run the scala app in sbt command line
```sbt
project lab
run
```
## Server conf
### If nginx
see more info in the [nginx doc for a jetty](https://www.nginx.com/resources/wiki/start/topics/examples/javaservers)
#### gist
```
proxy_pass http://localhost:8080; # <== jetty app referenced by nginx
```
### If apache
see more info in the [jetty doc for apache](http://wiki.eclipse.org/Jetty/Tutorial/Apache#Configuring_Apache)
#### Required apache mod
```
sudo a2enmod proxy_ajp # <= needed for proxy relay
```
#### Expected apache conf
```
TODO
## Doors status protocol
**TODO**
DOORS callDoors
// need to handle the various return formats
// then send one of 2 * 2 possibilities (+ unknown exceptions)
// action | response
// login login ok
// login can't login
// register register ok
// register can't register
// register login exists // ML remark : this is redundant
// TODO verif protocole de statuts
```
......@@ -54,13 +54,14 @@ server {
deny all;
}
#location /testdocker {
# proxy_pass http://0.0.0.0:32789;
# proxy_redirect off;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Host $server_name;
#}
# for minidoors api
location /api {
proxy_pass http://0.0.0.0:32789;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
......@@ -32,8 +32,8 @@
- HOST=0.0.0.0 # script will bind server to this address
- DEBUG_FLAG=false
- SQL_HOST=comex_db_backend # script will read/write sql to this host
- DOORS_HOST=localhost
- DOORS_PORT=32789 # forwarded port we're accessing in tests
- DOORS_HOST=134.158.75.71
- DOORS_PORT=80 # forwarded port we're accessing via ajax in tests
# POSSIBLE add php legacy communityexplorer site
# (currently served in parallel: see doc/nginx_conf.md)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment