This is the simplest configuration for developers to start with.
docker-compose run --rm django ./manage.py migrate
docker-compose run --rm django ./manage.py createsuperuser
and follow the prompts to create your own user. Make sure to supply an email address.docker-compose run --rm django ./manage.py createarangoreadonlyuser
docker-compose run --rm django ./manage.py setupdevenv <user_email from above step>
docker-compose up
Ctrl+C
Occasionally, new package dependencies or schema changes will necessitate maintenance. To non-destructively update your development stack at any time:
docker-compose pull
docker-compose build --pull --no-cache
docker-compose run --rm django ./manage.py migrate
docker-compose run --rm arangodb arangod --database.auto-upgrade
This configuration still uses Docker to run attached services in the background, but allows developers to run Python code on their native system.
docker-compose -f ./docker-compose.yml up -d
psycopg2
build prerequisitespip install -e .[dev]
source ./dev/export-env.sh
./manage.py migrate
./manage.py createsuperuser
and follow the prompts to create your own user. Make sure to supply an email address../manage.py createarangoreadonlyuser
./manage.py setupdevenv <user_email from above step>
docker-compose -f ./docker-compose.yml up -d
is still activesource ./dev/export-env.sh
./manage.py runserver
source ./dev/export-env.sh
celery --app multinet.celery worker --loglevel INFO --without-heartbeat
docker-compose stop
DJANGO OAUTH TOOLKIT
section click the Add
in the Applications
row. This will bring you to the creation dialog for an (oauth) application.http://localhost:8080/
(must include trailing slash)Public
for the Client Type fieldAuthorization Code
for the Authorization Grant Type field.env.default
file to .env
VUE_APP_OAUTH_API_ROOT=http://localhost:8000/oauth/
VUE_APP_OAUTH_CLIENT_ID=<the client id you copied above>
After these steps, you should be able to login to the API from the client.
APIs and Services
> Credentials
.SOCIAL ACCOUNTS
click add next to Social applications
.Google
.Google Multinet Oauth
.secret key
from Google's cloud dashboard to the MultiNet instance.No changes should be necessary from the OAuth setup steps from above, but they must be completed. When logging in, choose login with Google.
Attached services may be exposed to the host system via alternative ports. Developers who work on multiple software projects concurrently may find this helpful to avoid port conflicts.
To do so, before running any docker-compose
commands, set any of the environment variables:
DOCKER_POSTGRES_PORT
DOCKER_RABBITMQ_PORT
DOCKER_MINIO_PORT
The Django server must be informed about the changes:
DJANGO_MINIO_STORAGE_MEDIA_URL
, using the port from DOCKER_MINIO_PORT
.DJANGO_DATABASE_URL
, using the port from DOCKER_POSTGRES_PORT
DJANGO_CELERY_BROKER_URL
, using the port from DOCKER_RABBITMQ_PORT
DJANGO_MINIO_STORAGE_ENDPOINT
, using the port from DOCKER_MINIO_PORT
Since most of Django's environment variables contain additional content, use the values from
the appropriate dev/.env.docker-compose*
file as a baseline for overrides.
tox is used to execute all tests.
tox is installed automatically with the dev
package extra.
When running the "Develop with Docker" configuration, all tox commands must be run as
docker-compose run --rm django tox
; extra arguments may also be appended to this form.
Run tox
to launch the full test suite.
Individual test environments may be selectively run. This also allows additional options to be be added. Useful sub-commands include:
tox -e lint
: Run only the style checkstox -e type
: Run only the type checkstox -e test
: Run only the pytest-driven testsTo automatically reformat all code to comply with
some (but not all) of the style checks, run tox -e format
.