Files
web2.0-backend/setup.md
T
2017-05-17 18:19:20 +03:00

1.5 KiB

SIKWEB 2.0

Accessing the source

Clone this repository and enter it

Set up your SSH key authentication in GitLab Profile Settings. Then clone the repository:

git clone git@sika.sahkoinsinoorikilta.fi:vtmk/web2.0.git
cd web2.0

Change to the development branch:

git checkout develop

Create your settings.py with default passwords

Installation with Docker

Installing Docker

Install docker and docker-compose. On Ubuntu you can install Docker from the repositories but docker-compose must be installed separately.

sudo apt-get install docker

Navigate to docker-compose releases for install information.

Removing docker images (Optional)

This will remove your old docker images.

sudo docker rm $(sudo docker ps -a -q)

sudo docker rmi -f $(sudo docker images -a -q)

Setting up the system

This will setup the environment for you and run the migrations.

sudo scripts/autoinstall.sh

Start database

sudo docker-compose start db

Start local web at localhost/8000:

sudo docker-compose up web

Stop local web:

CTRL+C

Stop database:

sudo docker-compose stop db

Useful commands:

sudo docker-compose run web python manage.py migrate
sudo docker-compose run web python manage.py makemigrations infoscreen members webapp
sudo docker-compose run web python manage.py migrate
sudo docker-compose run web python manage.py createsuperuser