-
Notifications
You must be signed in to change notification settings - Fork 13
Development Guide
Start/stop all containers
docker-compose up -d -t1
docker-compose down -t1
Restart a container
docker-compose restart <container>
docker-compose restart web -t1
Logs
docker-compose logs -f
docker-compose logs -f web
Rebuild image
docker-compose build
Enter a container
docker-compose exec web bash
manage
There are various commands in here. Feel free to add more.
Go into the iPython shell. Note that it runs the shell.py
script, which auto imports a bunch of things for convenience.
shell
Run tests
runtests <options>
runtests -vs # run with stdout/verbose
runtests --create-db # reset the db
or
./runtests.py
There are various db commands in the manage db
command group
Drop database
manage db drop
Create database
manage db create
Reset database schema
manage db reset # reset DB to latest without migrations
manage db reset --no-tables # clear tables
manage db reset --migrate # reset DB to latest with migrations
Run database migrations
manage db migrate
manage db migrate --undo # revert latest migration
Seed database
manage seed local --reset-db
Make a migration
manage db makemigration -m "foo"
This will make an Alembic migration file in alembic/versions
. Inspect it and then check it in.
Note that if someone checks in a new migration file at the same time you'll need to update the down_revision dependency.
Make a local_config.py
file at the root. Add Python variables with the same name as ones in app/config.py
to override.
e.g.
CSRF_ENABLED = False