Skip to content

Commit 931c8a9

Browse files
authored
Merge pull request hack4impact#170 from ozbek/docs
Update setup docs
2 parents 523c126 + 7ca25ae commit 931c8a9

File tree

1 file changed

+44
-14
lines changed

1 file changed

+44
-14
lines changed

docs/setup.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,74 @@ Note: if you are using a python2.x version, point the -p value towards your pyth
2929
$ xcode-select --install
3030
```
3131

32-
## Add Environment Variables
32+
## Add Environment Variables
3333

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.
3638
```
3739
MAIL_USERNAME=example@domain.com
3840
MAIL_PASSWORD=SuperSecretPassword
3941
SECRET_KEY=SuperRandomStringToBeUsedForEncryption
4042
```
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+
4153
**Note: do not include the `.env` file in any commits. This should remain private.**
4254

4355
## Install the dependencies
4456

4557
```
46-
$ pip install -r requirements/common.txt
47-
$ pip install -r requirements/dev.txt
58+
$ pip install -r requirements.txt
4859
```
4960

5061
## Other dependencies for running locally
5162

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/)):_
5375

5476
```
5577
$ brew install redis
5678
```
5779

58-
Linux:
80+
_Linux:_
5981

6082
```
6183
$ sudo apt-get install redis-server
6284
```
6385

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+
64100
## Create the database
65101

66102
```
@@ -81,17 +117,11 @@ Note that this will create an admin user with email and password specified by th
81117
$ python manage.py add_fake_data
82118
```
83119

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-
91120
## Running the app
92121

93122
```
94123
$ source env/bin/activate
95124
$ honcho start -f Local
96125
```
97126

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

Comments
 (0)