@@ -13,6 +13,7 @@ To run a copy of this project locally you will require:
13
13
+ Docker(Optional)
14
14
+ Redis server(Optional)
15
15
16
+
16
17
### Installation
17
18
18
19
You can run a local version of flashlearn by cloning this repo
@@ -26,16 +27,17 @@ and following these instructions
26
27
source venv/bin/activate
27
28
pip install -r requirements.txt
28
29
30
+ If pip installation fails but you dont need postgresql database feel free to remove ** psycopg2** from the list and try the installation again.
29
31
The file .flaskenv is populated with default development configs that you
30
32
can override to suit your needs.
31
33
To run the server directly type
32
34
33
35
flask run --host=0.0.0.0
34
36
35
37
38
+
36
39
#### Setting up Postgresql
37
- First ensure the latest version of postgresql is installed, If pip installation
38
- fails but you dont need postgres feel free to remove ** psycopg2** from the list and try the installation again.
40
+ First ensure the latest version of postgresql is installed!
39
41
To setup psql proceed as follows:
40
42
41
43
+ Create a new postgres user, set the user password and make sure that you can access psql shell
@@ -45,18 +47,21 @@ To setup psql proceed as follows:
45
47
Ignore this step to use sqlite3
46
48
47
49
50
+
51
+
48
52
#### Setting up Redis cache
49
53
Ensure you have redis server installed in your system.
50
54
Enable Redis cache from BaseConfig class file in /instance/config.py by
51
55
changing the value of ** USE_REDIS_CACHE** from False to True
52
56
53
57
58
+
54
59
#### Running on Docker
55
60
First ensure docker and docker-compose are installed in your machine, then run:
56
61
57
62
+ Copy paste the contents of .env.dev into a new file named.env.prod
58
63
59
- Run :
64
+ To run the app with all services defined in the docker-compose file run :
60
65
61
- docker-compose up --build to deploy the app with docker-compose file
66
+ docker-compose up --build
62
67
0 commit comments