- Docker Engine 1.13.1+
- Docker Compose 1.10.0+
-
Edit the
DATABASE_URL
insrc/pycontw2016/settings/local.env
(Copy fromlocal.sample.env
). Use the Postgres username, password, database name, and port configured in./docker-compose-dev.yml
.DATABASE_URL=postgres://postgres:secretpostgres@db:5432/pycontw2016
-
Simply run the following command to install all dependencies, activate a containerized Postgres server, and enter into a poetry shell inside the application container (
ctrl+c
to quit)../enter_dev_env.sh
-
In the shell, you can run any commands as if you are in a local development environment. Here are some common Django commands:
# make migrations python manage.py makemigrations # apply migrations python manage.py migrate # create a superuser python manage.py createsuperuser # pull out strings for translations python manage.py makemessages -l en_US -l zh_Hant # compile translations python manage.py compilemessages # run the dev server (you can access the site at http://localhost:8000/) python manage.py runserver 0.0.0.0:8000