Skip to content

Commit

Permalink
Fix and document small issue around SITE_URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kelly committed Apr 22, 2015
1 parent 1323db0 commit d2fa5bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ the site should be available on port 8000 at the IP output by running:
$ boot2docker ip
```

Note that if you're running the site via boot2docker, you'll want to add a
`.env` file to the project's root director with the IP given by the command
above. For example, if your IP was `192.168.1.102`, you'd create a `.env` file
that looked like:

```
SITE_URL=http://192.168.1.102:8000
```

For [admin](http://localhost:8000/admin/) access, create admin account with:

```
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ web:
- DATABASE_URL=mysql://pontoon:asdf@db/pontoon
- SESSION_COOKIE_SECURE=False
- HMAC_KEY=asdf
- SITE_URL=http://docker:8000
command: ./bin/run-compose.sh
2 changes: 1 addition & 1 deletion pontoon/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def path(*args):
'hmac-key': os.environ['HMAC_KEY'],
}

SITE_URL = os.environ['SITE_URL']
SITE_URL = os.environ.get('SITE_URL', 'http://localhost:8000')

# Microsoft Translator API Key
MICROSOFT_TRANSLATOR_API_KEY = os.environ.get('MICROSOFT_TRANSLATOR_API_KEY', '')
Expand Down

0 comments on commit d2fa5bb

Please sign in to comment.