-
Notifications
You must be signed in to change notification settings - Fork 0
Managing the remote server
First of all, log yourself into the machine.
Now, you should navigate to the source code folder.
If you are redeploying don't forget to pull the latest version of the code from Github.
git pull
(your Github credentials)
Open tmux terminal 'webserver' with
tmux a -t webserver
tmux is like a normal terminal, but with some more options. To use these options, activate command mode with
ctrl+B
Now you won't be able to type into the console, but rather your next input will be associated to a command. In this case, we want to navigate through the other tmux terminals that are open in the background.
For this, press S.
Now we should be seeing a list of terminals called something like "windows" and "windows(attached)" <-- this one is the one we were using. To navigate simply use the arrow keys and select using Enter.
In case the console appears to be "partitioned" into different terminals, you can switch between them by pressing ctrl+B and arrow keys to navigate. Intuitively, the direction of the arrow keys is the direction you will move the cursor into the next terminal.
Tmux cheatsheet: https://gist.github.com/henrik/1967800
Once we find the terminal with the running server (you should be able to identify it by the output), simply kill it with
ctrl+C
Launch the new version in the tmux terminal
sh launch_no_docker.sh -aweb
This installs pip requirements, npm packages and launch the new version
Now, you can switch back to other terminal to keep on working, or just close the terminal and tmux will stay open in the background. DO NOT DO ctrl+D to exit tmux but rather do ctrl+B and then hit d to detach. If you're working with a graphical linux distro (like Ubuntu), simply close your local terminal window.
Just
sh launch_no_docker.sh -aweb
That's it.
Restart database
sudo service mongod restart
This won't remove the stored data.
sh launch_no_docker.sh -h