Skip to content
Viktor Smári edited this page Oct 21, 2018 · 17 revisions

There are multiple ways of running this software

Virtual environment - ( Recommended )

  1. Create a virtual environment ( You might need to install virtualenv )

virtualenv venv

  1. Activate the virtual environment

source venv/bin/activate

  1. Install django and requirements with the install script

python initial_setup.py --venv

  1. Optional: For more fake data run:

manage.py load_fake_data --full --reset

  1. Start server

venv/bin/python manage.py runserver 0.0.0.0:8000

Local setup

  1. Install Python. You will need pip installed which is included by default in Python versions 2.7.9

  2. Clone the Wasa2il Git project: git clone https://github.com/piratar/wasa2il

  3. In a command line, run the script initial_setup.py, which should guide you through the rest of the process.

Docker compose ( Might contain some bugs, let us know! )

  1. Install docker and docker-compose

  2. Build it by issuing: docker-compose up

  3. Then migrate the database: (you might need to run it twice)

    docker-compose run wasaweb python manage.py migrate

  4. You also might need to create a superuser

    docker-compose run wasaweb python manage.py createsuperuser

  5. If you want some test data to be created for you:

    docker-compose run wasaweb python manage.py load_fake_data

default superuser pirate:pirate

users u1:asdf & u2:asdf

Docker (without compose)

docker build -t piratar/wasa2il .
docker run --name wasa2il-dev-container -p 8000:8000 -it piratar/wasa2il

The first command builds a new docker image and gives it the name piratar/wasa2il The second command starts a new docker container based of the latest version of the piaratar/wasa2il image, forwards port 8000 of the docker host to the same port on the docker container, and names it wasa2il-dev-container. The Docker CMD command runs initial_setup.py so when running the container for the first time you will be prompted for username, e-mail and password.

Since the sqlite database is created inside the container on the first run, and not for example mounted through a volume, if you want your test data to persist you must re-use the container after building it. You can stop and start the named container like so:

docker stop wasa2il-dev-container

and

docker start wasa2il-dev-container
Clone this wiki locally