Skip to content

Development Environment

Andrew Benedict Wallace edited this page Dec 19, 2018 · 10 revisions

Setting up a development environment

Installation with Docker Compose

Untested, but try:

  1. Install Docker and Docker Compose

  2. Clone the repository:

    git clone https://github.com/CobwebOrg/cobweb-django
    cd cobweb-django
  3. Set up the database:

    First run docker-compose run web bash to get a shell inside the web container. Then, inside that shell:

    1. python manage.py migrate to set up the database.
    2. python manage.py loaddata languages_data.json.gz to load data from Django-Languages-Plus
    3. python manage.py createsuperuser to create an admin account.
  4. Install node packages (only needed if you're editing scss / javascript):

    docker-compose run node npm install

    Be aware that docker-compose.yml is set up to mount a separate docker volume on top of node_modules, since it gets quite large and docker's bind mounts are slow. Thus, node_modules will look empty from your host machine. This is normal, and you should be able to see your node modules by running docker-compose run node ls node_modules.

  5. docker-compose up

    Cobweb should be running at http://127.0.0.1:8000, and the Django admin site at http://127.0.0.1:8000/admin