-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
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 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://gitlab.com/piratar/wasa2il
-
In a command line, run the script initial_setup.py, which should guide you through the rest of the process.
-
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