Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Victornguli authored Apr 26, 2021
1 parent 7d24cc8 commit c6e329b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ To run a copy of this project locally you will require:
+ Docker(Optional)
+ Redis server(Optional)


### Installation

You can run a local version of flashlearn by cloning this repo
Expand All @@ -26,16 +27,17 @@ and following these instructions
source venv/bin/activate
pip install -r requirements.txt

If pip installation fails but you dont need postgresql database feel free to remove **psycopg2** from the list and try the installation again.
The file .flaskenv is populated with default development configs that you
can override to suit your needs.
To run the server directly type

flask run --host=0.0.0.0



#### Setting up Postgresql
First ensure the latest version of postgresql is installed, If pip installation
fails but you dont need postgres feel free to remove **psycopg2** from the list and try the installation again.
First ensure the latest version of postgresql is installed!
To setup psql proceed as follows:

+ Create a new postgres user, set the user password and make sure that you can access psql shell
Expand All @@ -45,18 +47,21 @@ To setup psql proceed as follows:
Ignore this step to use sqlite3




#### Setting up Redis cache
Ensure you have redis server installed in your system.
Enable Redis cache from BaseConfig class file in /instance/config.py by
changing the value of **USE_REDIS_CACHE** from False to True



#### Running on Docker
First ensure docker and docker-compose are installed in your machine, then run:

+ Copy paste the contents of .env.dev into a new file named.env.prod

Run:
To run the app with all services defined in the docker-compose file run:

docker-compose up --build to deploy the app with docker-compose file
docker-compose up --build

0 comments on commit c6e329b

Please sign in to comment.