-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
WARNING - This Wiki might be out of date!
There are multiple ways of running this software
- Create a virtual environment ( You might need to install
virtualenv
)
virtualenv venv
- Activate the virtual environment
source venv/bin/activate
- Install django and requirements with the install script
python initial_setup.py --venv
- Optional: For more fake data run:
manage.py load_fake_data --full --reset
- Start server
venv/bin/python manage.py runserver 0.0.0.0:8000
-
Install docker and docker-compose
-
Build it by issuing:
docker-compose up
-
Then migrate the database: (you might need to run it twice)
docker-compose run wasaweb python manage.py migrate
-
You also might need to create a superuser
docker-compose run wasaweb python manage.py createsuperuser
-
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 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
-
Install Python. You will need pip installed which is included by default in Python versions 2.7.9
-
Clone the Wasa2il Git project:
git clone https://github.com/piratar/wasa2il
-
In a command line, run the script initial_setup.py, which should guide you through the rest of the process.
If you run into errors manually installing with pip
(or get error output from pip
wile running initial_setup.py
), more often than not it's due to you not having MySQL installed. Try commenting those lines out of the requirements.txt
file and running pip again.
If you want to run Wasa2il with MySQL, make sure MySQL and the relevant development headers are installed before running pip
again.