Skip to content

Instantly share code, notes, and snippets.

@almazkun
Created December 7, 2021 06:22
Show Gist options
  • Save almazkun/697d13b77d7e9a96b00e8ecdeb4edb5f to your computer and use it in GitHub Desktop.
Save almazkun/697d13b77d7e9a96b00e8ecdeb4edb5f to your computer and use it in GitHub Desktop.

Note you will need to have MySQL server available for it to work, otherwise append to the end of the settings/settings_local.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'mydatabase',
    }
}
git clone [email protected]:soelab/webbnm.git
cd webbnm
docker build -t webbnm .
docker run --rm -it --entrypoint bash --mount type=bind,source="$(pwd)",target=/home/webbnm -p 80:80 webbnm
# You will be in container now
cd /home/webbnm
python3 manage.py migrate
python3 manage.py createsuperuser
python3 manage.py runserver 0.0.0.0:80

Open localhost in the browser. You should see 404 error. Navigate to the localhost/da6/. You should see the admin login page. You should be able to login with your created Super User.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment