Skip to content

Commit

Permalink
- Update README_production.rst to fix incorrect commands, links and f…
Browse files Browse the repository at this point in the history
…ormatting

- Remove README inside docker folder
  • Loading branch information
ankitjavalkar committed Jan 4, 2018
1 parent 7d7cc53 commit 2846e43
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 63 deletions.
40 changes: 24 additions & 16 deletions README_production.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ Production Deployment

This README provides documentation to help deploy Yaksh in a production
environment. If you wish to take Yaksh on a trial run, here is a
[Quickstart Guide]
(https://github.com/FOSSEE/online\_test/blob/master/README.md)
`Quickstart Guide <https://github.com/FOSSEE/online\_test/blob/master/README.rst>`__

###################
Deploying Locally
###################

Follow these steps to deploy locally on the server. For deployment instructions using Docker see :ref:`deploying-multiple-dockers`.
Follow these steps to deploy locally on the server. For deployment instructions using Docker see `Deploying Multiple Dockers <https://github.com/FOSSEE/online_test/blob/add-docker-compose-test/README_production.rst#deploying-multiple-dockers>`__

Pre-Requisite
^^^^^^^^^^^^^
Expand Down Expand Up @@ -56,7 +55,10 @@ Installation & Usage
To install this app follow the steps below:

1. Clone this repository and cd to the cloned repo.
``$ git clone https://github.com/FOSSEE/online_test.git``

::

$ git clone https://github.com/FOSSEE/online_test.git

2. Rename the ``.sampleenv`` to ``.env``

Expand Down Expand Up @@ -98,7 +100,8 @@ To install this app follow the steps below:
that this will likely spawn multiple processes as "nobody" depending
on the number of server ports specified.

You can also use a Dockerized code server, see :ref:`dockerized-code-server`.
You can also use a Dockerized code server, see `Dockerized Code Server <https://github.com/FOSSEE/online_test/blob/add-docker-compose-test/README_production.rst#using-dockerized-code-server>`__


6. The ``wsgi.py`` script should make it easy to deploy this using
mod\_wsgi. You will need to add a line of the form:
Expand All @@ -109,7 +112,7 @@ To install this app follow the steps below:

to your apache.conf. For more details see the Django docs here:

https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/

7. Create a Superuser/Administrator:

Expand All @@ -125,9 +128,7 @@ To install this app follow the steps below:
each user. Users can potentially write output into these that can be
used for checking later.

10. As admin user you can visit http://desired\_host\_or\_ip/exam/monitor to view results
and user data interactively. You could also "grade" the papers
manually if needed.
10. As admin user you can visit http://desired\_host\_or\_ip/exam/monitor to view results and user data interactively. You could also "grade" the papers manually if needed.

.. _dockerized-code-server:

Expand All @@ -137,14 +138,20 @@ Using Dockerized Code Server
1. Install
`Docker <https://docs.docker.com/engine/installation/>`__

2. Go to the directory where the project is located cd
/path/to/online\_test
2. Go to the directory where the project is located

::

3. Create a docker image. This may take a few minutes docker build -t
yaksh\_code\_server -f ./docker/Dockerfile\_codeserver
cd /path/to/online_test

4. Check if the image has been created using the output of, docker
images
3. Create a docker image. This may take a few minutes,

::

docker build -t yaksh_code_server -f ./docker/Dockerfile_codeserver

4. Check if the image has been created using the output of ``docker
images``

5. Run the invoke script using the command ``invoke start`` The command
will create and run a new docker container (that is running the
Expand All @@ -153,6 +160,7 @@ Using Dockerized Code Server

6. You can use ``invoke --list`` to get a list of all the available commands


.. _deploying-multiple-dockers:

######################################
Expand Down Expand Up @@ -211,7 +219,7 @@ Follow these steps to deploy and run the Django Server, MySQL instance and Code

::

invoke clean
invoke remove

12. You can use ``invoke --list`` to get a list of all the available commands

Expand Down
30 changes: 0 additions & 30 deletions docker/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions online_test/.env.sample

This file was deleted.

2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def serve(ctx):
@task
def clean(ctx):
print("** Discarding database **")
ctx.run("rm -rf {0}".format(os.path.join(SCRIPT_DIR, 'db.sqlite3')))
remove_check_file(os.path.join(SCRIPT_DIR, 'db.sqlite3'))

@task
def getimage(ctx, image=SRC_IMAGE_NAME):
Expand Down

0 comments on commit 2846e43

Please sign in to comment.