83 lines
1.5 KiB
Markdown
83 lines
1.5 KiB
Markdown
# 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.
|
|
|
|
```BASH
|
|
sudo apt-get install docker
|
|
```
|
|
Navigate to [docker-compose releases](https://github.com/docker/compose/releases) for install information.
|
|
|
|
### Removing docker images (Optional)
|
|
|
|
This will remove your old docker images.
|
|
|
|
```BASH
|
|
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.
|
|
|
|
```BASH
|
|
sudo scripts/autoinstall.sh
|
|
```
|
|
|
|
### Start database
|
|
|
|
```BASH
|
|
sudo docker-compose start db
|
|
```
|
|
|
|
### Start local web at localhost/8000:
|
|
|
|
```BASH
|
|
sudo docker-compose up web
|
|
```
|
|
|
|
### Stop local web:
|
|
|
|
```
|
|
CTRL+C
|
|
```
|
|
|
|
### Stop database:
|
|
|
|
```
|
|
sudo docker-compose stop db
|
|
```
|
|
|
|
### Useful commands:
|
|
|
|
```BASH
|
|
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
|
|
```
|