Django-based Web Frontend for osmaxx.
- Project Repository (Git)
- Project Development Environment (Docker)
- Commonly used commands for development
We do not recommend to run the application local on your machine but it's possible. We recommend to use the development docker containers.
Run it locally on Linux (Development)
to set up
*.env files suitable for local use of our docker-compose files. Do not use this for production! It will make use of insecure and hard coded passwords.
Copy the environment folder
compose-env and adapt the latter's content.
cp -r compose-env-dist compose-env # Then, edit compose-env/*.env
Docker container bootstrapping
For the rest of the readme, if in development:
docker-compose -f docker-compose.yml -f docker-compose-dev.yml
or source the helper script
source activate_local_development. This enables to use
-f options and without needing to specify
To setup all the containers and their dependencies by hand, run
In production, you should be setting
DEPLOY_VERSION=xxx before running any of the commands below, where
the version you'd like to deploy.
The rest of the documentation can be followed independently if on production or on development.
Update the containers
Then initiate the project defaults by running the following command:
docker-compose run frontend /bin/bash -c './manage.py createsuperuser'
Alternative to this command, bootstrap the container and execute the commands inside the container by hand:
docker-compose run frontend /bin/bash
Inside the container:
- (optional, recommended) setup a superuser:
$ ./manage.py createsuperuser
Running the project
Start the containers using docker compose:
Unsure which version is running?
<your_ip> is your public IP.
Can be found under Testing.
Problems & Solutions
ProgrammingError at /login/
relation "django_site" does not exist LINE 1: ..."django_site"."domain", "django_site"."name" FROM "django_si...
You forgot to run the migrations
Tests failed, but worked before with no apparent change
Do not run
docker-compose build --no-cache. Use
docker-compose rm -f && docker-compose build, or
if you really want to start clean, remove all docker containers
docker rm -f $(docker ps -q)
and remove all images
docker rmi -f $(docker images -q)
WARNING: This removes all containers/images on the machine and is discouraged in production.