pyung / Python-Nigeria-Community-Site

Website template for communities and user-groups.
http://krohx.com/ug-template
MIT License
2 stars 10 forks source link

Documentation for setting up project #13

Open gbozee opened 6 years ago

gbozee commented 6 years ago

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 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](https://www.gatsbyjs.org/) since it is the framework of choice that would be used in the building of the frontend
wolejnr commented 6 years ago

@Olamyy @Abwas Have you been able to set up the project on your system? If yes which operating system are you running?

Abwas commented 6 years ago

Not yet still working on it. My OS is Windows 10

Abwas commented 6 years ago

@gbozee Please I encountered this error: ERROR: Windows named pipe error: The system cannot find the file specified. (code: 2) while trying to run the create database command: $ docker-compose -f local.yml up -d postgres mailhog though I have docker and docker-compose installed on Windows. Any help will be appreciated please! Thanks.

Abwas commented 6 years ago

Though this is my first encounter with Django cos I'm more familiar with Flask.

gbozee commented 6 years ago

did you check if docker is running? Try restarting your docker service

gbozee commented 6 years ago

this isn't a django problems as such. There is nothing stopping you from installing django locally on your system. The docker setup was more for setting up a database and a mail server easily

Abwas commented 6 years ago

OK thanks though I didn't install the docker locally, I installed it in the virtual environment. I'm trying to install locally now but failed cos it requires Windows 10 Pro or Enterprise Version 10586 and mine is Windows 10 Home. So please any alternative for setting up the database and mail server without using docker. Thanks!

gbozee commented 6 years ago

If that is the case, then you don't even need docker at all. As long as you have postgres installed, everything can be installed locally. Also the mailhog for local email binary can be downloaded locally on the system of choice https://github.com/mailhog/MailHog

Abwas commented 6 years ago

@gbozee Apologies guys, so sorry for the lack of communication, it wasn't intentional. My system was faulty for the past two weeks and still not in good shape. Please any progress with the project documentation so far?