yay all the ideas
- idea-town Idea Town server and front end repo
- idea-town-splash Splash site for signups
- idea-town-addon Main addon
IRC: #ideatown
WIKI: https://wiki.mozilla.org/Idea-Town
-
Install Docker and docker-compose
-
Make sure you have a default Docker machine, i.e.:
docker-machine create -driver virtualbox default
-
Make sure your shell can see the default Docker machine, i.e.:
eval "$(docker-machine env default)"
-
To see the IP address of the default Docker machine:
docker-machine ip default
-
Add an entry for
ideatown.dev
in your/etc/hosts
pointing to the Docker machine IP192.168.99.100 ideatown.dev
- This entry is necessary to support Firefox Accounts. (Possibly, also static assets in the future)
-
Create & set up the Docker containers:
docker-compose up
- This may take some time.
- Note! A papercut: Sometimes the database container is not yet fully started
up when the Django container wants to connect to it. When this happens, just
try
docker-compose up
again. (Ugh, this is a known bug in docker-compose. Maybe we can find a workaround?)
-
To visit the Django server:
open http://ideatown.dev:8000/
- (or, whatever IP was reported by
docker ip
and port 8000)
-
To shell into one of the containers, e.g. to run Django commands:
docker exec -t -i ideatown_server_1 bash
-
If you change
package.json
to add dependencies forgulpfile.js
, you must rebuildclient_build
:docker-compose build client_build
-
If you change
requirements.txt
to add dependencies for Django, you must rebuildserver
:docker-compose build server
There's a sample test in idea_town/base/tests.py
for your convenience, that
you can run using the following command:
python manage.py test
If you want to run the full suite, with flake8 and coverage, you may use tox. This will run the tests the same way they are run by travis):
pip install tox
tox
The .travis.yml
file will also run coveralls by
default.
If you want to benefit from Travis and Coveralls, you will need to activate them both for your project.
Oh, and you might want to change the "Build Status" and "Coverage Status" links at the top of this file to point to your own travis and coveralls accounts.
- Make sure you have docker and docker-compose
- docker-compose up
-
Add your project in Docker Registry as Automated Build
-
Prepare a 'env' file with all the variables needed by dev, stage or production.
-
Run the image:
docker run --env-file env -p 80:8000 mozilla/idea-town
- heroku create
- heroku config:set DEBUG=False ALLOWED_HOSTS=.herokuapp.com, SECRET_KEY=something_secret DATABASE_URL gets populated by heroku once you setup a database.
- git push heroku master
A newrelic.ini file is already included. To enable NewRelic monitoring add two enviroment variables:
- NEW_RELIC_LICENSE_KEY
- NEW_RELIC_APP_NAME