Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing errors with some commands in Setting-up-the-development-server… #759

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions Setting-up-the-development-server.md

This file was deleted.

89 changes: 89 additions & 0 deletions Setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Setting up Development server

## Setting Up Development Server using Vagrant

### Install [Vagrant](https://www.vagrantup.com/)

### Get [Virtualbox](https://www.virtualbox.org/)

### Follow the given commands

```sh
# Move to project directory
cd BLT

# Start vagrant - It takes time during the first run, so go get a coffee!
vagrant up

# SSH into vagrant
vagrant ssh

# Create tables in the database
python BLT/manage.py migrate

# Create a super user
python BLT/manage.py createsuperuser

# Collect static files
python BLT/manage.py collectstatic

# Run the server
python BLT/manage.py runserver
```

### Ready to go

Then go to `http://127.0.0.1:8000/admin/socialaccount/socialapp/` and add filler information for social auth accounts.
Add a Domain `http://127.0.0.1:8000/admin/website/domain/` with the name 'owasp.org'.

### Voila go visit `http://localhost:8000`

**Note:** In case you encounter an error with vagrant's vbguest module, run `vagrant plugin install vagrant-vbguest`
from the host machine.

## Setting Up Development Server using Python Virtual Environment

```sh

# Install postgres on mac using brew
brew install postgresql

# Install postgres on ubuntu
sudo apt-get install postgresql

# Install pipenv on ubuntu
sudo apt-get install pipenv

# Install pipenv on mac
pip install pipenv

# Start virtual env
pipenv install | pipenv shell

# Move to project directory
cd BLT

# Create tables in the database
python BLT/manage.py migrate

# Load initial data
python3 manage.py loaddata website/fixtures/initial_data.json

# Create a super user
python BLT/manage.py createsuperuser

# Collect static files
python BLT/manage.py collectstatic

# Run the server
python BLT/manage.py runserver
```

### Ready to go now

Then go to `http://127.0.0.1:8000/admin/socialaccount/socialapp/` and add filler information for social auth accounts.
Add a Domain `http://127.0.0.1:8000/admin/website/domain/` with the name 'owasp.org'.

### Visit `http://localhost:8000`

**Note:** In case you encounter an error, run `sudo apt-get install libpq-dev`.