summaryrefslogtreecommitdiff
path: root/yaksh/documentation/installation.rst
diff options
context:
space:
mode:
authorprathamesh2016-08-31 01:37:20 +0530
committerprathamesh2016-08-31 01:37:20 +0530
commit24593514378e86cd2f0ef62e11e8a4c9dee0f5ad (patch)
tree686d263a31445a19d6addd4fca13e9bb1041755d /yaksh/documentation/installation.rst
parent11dec9deba7120f85d3d2b47cfd31fca8587bbbc (diff)
parentaefc8eed3b0c18520059b4005978f1db9cf5591b (diff)
downloadonline_test-24593514378e86cd2f0ef62e11e8a4c9dee0f5ad.tar.gz
online_test-24593514378e86cd2f0ef62e11e8a4c9dee0f5ad.tar.bz2
online_test-24593514378e86cd2f0ef62e11e8a4c9dee0f5ad.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into view_answerpaper
Resolved Conflicts: yaksh/views.py
Diffstat (limited to 'yaksh/documentation/installation.rst')
-rw-r--r--yaksh/documentation/installation.rst50
1 files changed, 49 insertions, 1 deletions
diff --git a/yaksh/documentation/installation.rst b/yaksh/documentation/installation.rst
index 4acee61..51efea7 100644
--- a/yaksh/documentation/installation.rst
+++ b/yaksh/documentation/installation.rst
@@ -64,4 +64,52 @@ This starts the code server
**And entering the following admin credentials**
* Username: admin
- * Password: admin \ No newline at end of file
+ * Password: admin
+
+Running The Code Server
+-----------------------
+
+**Local Instance**:
+
+In a new terminal run the command::
+
+ sudo python /path/to/code_server.py
+
+Keep this instance running in the background
+
+**Using Docker**:
+
+1. Install docker
+
+2. Create a Docker Image using the Docker file:
+
+ * Go to the directory where the project is located::
+
+ cd /path/to/online_test
+
+ * Build a docker image using the Dockerfile::
+
+ sudo docker build --tag=yaksh_code_server:v1 .
+
+3. Start a Docker container::
+
+ docker run -d -p 8001:8001 -p 53579:53579 -v /path/to/online_test/yaksh/output:/src/yaksh/output yaksh_code_server:v1
+
+**Note**:
+ * The default ports on which the code server runs and the pool port on which the former ports are available is specified in online_test/yaksh/settings.py. The code server also supports multiple ports
+
+ * The server port is 8001 by default, this can be changed in the settings::
+
+ SERVER_PORTS = 8001
+
+ * Multiple ports can be specified as::
+
+ SERVER_PORTS = [8001, 8002, 8003, 8004, 8005] # Or use range(8001, 8040) for larger number of ports
+
+ * The default pool port is 53579 by default, this can be changed in the settings::
+
+ SERVER_POOL_PORT = 53579
+
+ * The docker command to start a docker container when using multiple ports is::
+
+ docker run -d -p 8001-8039:8001-8039 -p 53579:53579 yaksh_code_server:v1