You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup.md
+44-14Lines changed: 44 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -29,38 +29,74 @@ Note: if you are using a python2.x version, point the -p value towards your pyth
29
29
$ xcode-select --install
30
30
```
31
31
32
-
## Add Environment Variables
32
+
## Add Environment Variables
33
33
34
-
Create a file called `.env` that contains environment variables in the following syntax: `ENVIRONMENT_VARIABLE=value`. For example,
35
-
the mailing environment variables can be set as the following
34
+
Create a file called `config.env` that contains environment variables in the following syntax: `ENVIRONMENT_VARIABLE=value`.
35
+
You may also wrap values in double quotes like `ENVIRONMENT_VARIABLE="value with spaces"`.
36
+
For example, the mailing environment variables can be set as the following.
37
+
We recommend using Sendgrid for a mailing SMTP server, but anything else will work as well.
36
38
```
37
39
MAIL_USERNAME=example@domain.com
38
40
MAIL_PASSWORD=SuperSecretPassword
39
41
SECRET_KEY=SuperRandomStringToBeUsedForEncryption
40
42
```
43
+
44
+
Other Key value pairs:
45
+
46
+
*`ADMIN_EMAIL`: set to the default email for your first admin account (default is `flask-base-admin@example.com`)
47
+
*`ADMIN_PASSWORD`: set to the default password for your first admin account (default is `password`)
48
+
*`DATABASE_URL`: set to a postgresql database url (default is `data-dev.sqlite`)
49
+
*`REDISTOGO_URL`: set to Redis To Go URL or any redis server url (default is `http://localhost:6379`)
50
+
*`RAYGUN_APIKEY`: api key for raygun (default is `None`)
51
+
*`FLASK_CONFIG`: can be `development`, `production`, `default`, `heroku`, `unix`, or `testing`. Most of the time you will use `development` or `production`.
52
+
41
53
**Note: do not include the `.env` file in any commits. This should remain private.**
42
54
43
55
## Install the dependencies
44
56
45
57
```
46
-
$ pip install -r requirements/common.txt
47
-
$ pip install -r requirements/dev.txt
58
+
$ pip install -r requirements.txt
48
59
```
49
60
50
61
## Other dependencies for running locally
51
62
52
-
Mac (using [homebrew](http://brew.sh/)):
63
+
You need [Redis](http://redis.io/), and [Sass](http://sass-lang.com/). Chances are, these commands will work:
64
+
65
+
66
+
**Sass:**
67
+
68
+
```
69
+
$ gem install sass
70
+
```
71
+
72
+
**Redis:**
73
+
74
+
_Mac (using [homebrew](http://brew.sh/)):_
53
75
54
76
```
55
77
$ brew install redis
56
78
```
57
79
58
-
Linux:
80
+
_Linux:_
59
81
60
82
```
61
83
$ sudo apt-get install redis-server
62
84
```
63
85
86
+
You will also need to install **PostgresQL**
87
+
88
+
_Mac (using homebrew):_
89
+
90
+
```
91
+
brew install postgresql
92
+
```
93
+
94
+
_Linux (based on this [issue](https://github.com/hack4impact/flask-base/issues/96)):_
95
+
96
+
```
97
+
sudo apt-get install libpq-dev
98
+
```
99
+
64
100
## Create the database
65
101
66
102
```
@@ -81,17 +117,11 @@ Note that this will create an admin user with email and password specified by th
81
117
$ python manage.py add_fake_data
82
118
```
83
119
84
-
## [Optional. Only valid on `gulp-static-watcher` branch] Use gulp to live compile your files
85
-
86
-
* Install the Live Reload browser plugin from [here](http://livereload.com/)
87
-
* Run `npm install`
88
-
* Run `gulp`
89
-
90
-
91
120
## Running the app
92
121
93
122
```
94
123
$ source env/bin/activate
95
124
$ honcho start -f Local
96
125
```
97
126
127
+
For Windows users having issues with binding to a redis port locally, refer to [this issue](https://github.com/hack4impact/flask-base/issues/132).
0 commit comments