Update docs to use .env file instead of local.py

This commit is contained in:
Paul McLanahan 2016-05-27 13:28:23 -04:00
Родитель 383096b2ab
Коммит edf2962332
5 изменённых файлов: 16 добавлений и 20 удалений

3
.env-dist Normal file
Просмотреть файл

@ -0,0 +1,3 @@
DEBUG=True
DEV=True
ALLOWED_HOSTS=*

Просмотреть файл

@ -506,6 +506,7 @@ RECAPTCHA_PRIVATE_KEY = config('RECAPTCHA_PRIVATE_KEY', default='')
RECAPTCHA_USE_SSL = config('RECAPTCHA_USE_SSL', cast=bool, default=True)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
NOSE_ARGS = config('NOSE_ARGS', default='', cast=Csv())
# Use a message storage mechanism that doesn't need a database.
# This can be changed to use session once we do add a database.

Просмотреть файл

@ -11,8 +11,6 @@ GTM_CONTAINER_ID = ''
SESSION_COOKIE_SECURE = False
USE_GRUNT_LIVERELOAD = False
# Twitter apps' consumer key/secret and access token/secret
TWITTER_APP_KEYS = {
'default': {

Просмотреть файл

@ -18,9 +18,9 @@ a non-production environment requires some additional Firefox profile configurat
Local Development
-----------------
#. Set ``FXA_IFRAME_SRC`` in your ``local.py`` to point to the FXA development server:
#. Set ``FXA_IFRAME_SRC`` in your ``.env`` file to point to the FXA development server:
``FXA_IFRAME_SRC = 'https://stomlinson.dev.lcip.org/'``
``FXA_IFRAME_SRC=https://stomlinson.dev.lcip.org/``
#. Set your local development server to run on ``127.0.0.1:8111``.
#. Quit Firefox.

Просмотреть файл

@ -37,9 +37,9 @@ If you are on Linux, you will need at least the following packages or their equi
python-dev libxslt-dev
Now configure the application to run locally by creating your local settings file::
Now configure the application to run locally by creating your local settings environment file::
$ cp bedrock/settings/local.py-dist bedrock/settings/local.py
$ cp .env-dist .env
You shouldn't need to customize anything in there yet.
@ -81,18 +81,12 @@ activated, so running the tests is as simple as::
.. note::
If your local tests run fine, but when you submit a pull-request our Jenkins
(continuous integration service) instance tells you the tests failed, it could
be due to the difference in settings between what you have in ``settings/local.py``
and what Jenkins uses: ``settings/jenkins.py``. You can run tests as close to Jenkins
as possible by doing the following::
$ JENKINS_HOME=1 ./manage.py test
This tells Bedrock to use the jenkins settings. This will require you to have a local
MySQL database server running and configured correctly, but may help you debug. Alternately
you can move your ``settings/local.py`` to a backup, copy ``settings/jenkins.py`` to
``settings/local.py`` and tweak the DB settings yourself to make it work.
If your local tests run fine, but when you submit a pull-request the tests fail in
`CircleCI <https://circleci.com/gh/mozilla/bedrock>`_, it could be due to the
difference in settings between what you have in ``.env``
and what CircleCI uses: ``.bedrock_demo_env``. You can run tests as close to Circle
as possible by moving your ``.env`` file to another name (e.g. ``.env-backup``), then
copying ``.bedrock_demo_env`` to ``.env``, and running tests again.
Make it run
-----------
@ -147,10 +141,10 @@ To work with/test these Waffle/Optimizely switches locally, you must add the swi
./manage.py switch firefox-new-optimizely on --create
You then must set an Optimizely project code in ``settings/local.py``::
You then must set an Optimizely project code in ``.env``::
# Optimize.ly project code
OPTIMIZELY_PROJECT_ID = 12345
OPTIMIZELY_PROJECT_ID=12345
.. note::