Home
On a custom server, on a repository of your choice, do the following commands.
tmux new -s leon
git clone --recursive https://github.com/EPFL-LARA/leon-web
cd leon-web
./start.sh
The script ./start.sh
takes care also of recompiling the documentation.
It runs leon-web
on the port 9900 of the server. You can specify the port as an argument of ./start.sh
To detach the session but letting leon-web to run, use the shortcut CTRL+a,d
.
To reattach, enter the following command.
tmux att -dt leon
For that, open the file start.sh
, and change the line:
activator "start $PORT"
to
activator -Djava.io.tmpdir=YOUR_TEMPORARY_DIRECTORY "start $PORT"
It will be used to create github repositories, etc.
Easiest way
This will make leon unavailable for a few minutes. If using tmux
, make sure you are in the session that started leon-web
.
-
CTRL+d
to stop the server git pull origin master
git submodule update --recursive
./start.sh
Nicer way. This is a way to recompile in the background.
On another terminal not running leon-web
:
git pull origin master
git submodule update --recursive
-
activator stage
to recompile
On the terminal running leon-web
-
CTRL+C
to exit the current running application. If it starts to recompile, no need to do the next step. ./start.sh
-
CTRL+a,d
to detach -
CTRL+a,c
Create another session -
CTRL+a,n
Switch from one session to the other. -
CTRL+a,-
New splitted terminal -
CTRL+a,o
Switch from one splitted terminal to the other in the same window. -
CTRL+a
and PAGUP, PAGEDOWN to view the history.q
to exit this mode. - Enter
exit
and press<enter>
to exit this new terminal
In the shell
-
tmux ls
to list sessions
[EPFL only] How to deploy to leon.epfl.ch
Note that Leon-web listens to the port 9900
(see script start.sh
), whereas Leon-web-dev
listens to 9876
, the only two ports opened to the external world. After providing your public key to the server, log in using the following command:
ssh leonweb@laraserver2.epfl.ch
Now make sure you are inside
-
~/git/leon-web
if you want to update leon.epfl.ch -
~/git/leon-web-dev
if you want to update leon.epfl.ch:9876
Note the following:
-
leon-web
contains two windows: - The first window checks the logs for errors
- The second one runs the script
start.sh
-
leon-web-dev
is configured to automatically update every time there is a push to master.
It is separated into three windows. - The first window is running the script
start.sh
- The second window is running the script
updater_bot.sh
, which checks modifications from github every 10 seconds, and if modified, performs update steps and restart the first window.
Make sure you always have these two windows in this order at the beginning if you use the scriptupdater_bot.sh
. - The third window is an empty command line.