Skip to content

Documentation for setting up project  #13

@gbozee

Description

@gbozee

Right now, there is a project setup for the community site located on the develop branch. What is remaining is providing a documentation on how to get the project up and running based on the different teams members are working on

Backend Team:

The documentation team is responsible for documenting the steps involved in setting up the project to run in the backend.
You would need to account for the different operating systems the users might use when trying to setup the project.

Here are the steps to replicate the setup locally

  1. User must have postgres installed on their systems
  2. Users must have python 3.6 installed on their systems.
  3. It would be nice if users are familar with docker and its ecosystem but it isn't necessary. It just makes the setup a lot easier.
  • Create a virtual environment in the same directory as the root of the project
$ virtualenv -p `which python3.6` venv
$ source venv/Scripts/activate # on linux or mac source venv/bin/activate
$ pip install -r requirements/local.txt
  • Creating a database for the application
# assuming the user has docker and docker-compose installed
$ docker-compose -f local.yml  up -d postgres mailhog

# create a startup script file to load up all the environment variables that would be used
$ touch .env

# add the following environmental variables to the `.env` file created
export DATABASE_URL=postgres://python_nigeria_site:postgres@localhost:7432/python_nigeria_site
export EMAIL_HOST=localhost

# run the .env script 
$ source .env

Start the application

$ python manage.py runserver

Frontend Team

It is assumed that members of the frontend team have node installed on their systems

After cloning the project, they run the following commands

# change directory to the frontend
$ cd frontend
$ npm install # if they use yarn then the command is yarn install
$ npx develop # or npm run develop or yarn develop

The frontend team would have to get familiar with gatsbyjs since it is the framework of choice that would be used in the building of the frontend

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions