diff --git a/README.md b/README.md index 264577d..3613cb9 100644 --- a/README.md +++ b/README.md @@ -47,12 +47,14 @@ docker compose up The whole application will be available after a few minutes. Open the URL `http://0.0.0.0:8000/` in a web-browser. You should see the NetBox homepage. -In the top-right corner you can login. -The default credentials are: -* Username: **admin** -* Password: **admin** -* API Token: **0123456789abcdef0123456789abcdef01234567** +To create the first admin user run this command: + +```bash +docker compose exec netbox /opt/netbox/netbox/manage.py createsuperuser +``` + +If you need to restart Netbox from an empty database often, you can also set the `SUPERUSER_*` variables in your `docker-compose.override.yml` as shown in the example. [wiki-getting-started]: https://github.com/netbox-community/netbox-docker/wiki/Getting-Started diff --git a/docker-compose.override.yml.example b/docker-compose.override.yml.example index 48365db..bcb6a71 100644 --- a/docker-compose.override.yml.example +++ b/docker-compose.override.yml.example @@ -6,11 +6,18 @@ services: # If you want the Nginx unit status page visible from the # outside of the container add the following port mapping: # - "8001:8081" - healthcheck: + # healthcheck: # Time for which the health check can fail after the container is started. # This depends mostly on the performance of your database. On the first start, # when all tables need to be created the start_period should be higher than on # subsequent starts. For the first start after major version upgrades of NetBox # the start_period might also need to be set higher. # Default value in our docker-compose.yml is 60s - start_period: 90s + # start_period: 90s + # environment: + # SKIP_SUPERUSER: "false" + # SUPERUSER_API_TOKEN: "" + # SUPERUSER_EMAIL: "" + # SUPERUSER_NAME: "" + # SUPERUSER_PASSWORD: "" + diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 72d2b33..c3fb321 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -82,6 +82,13 @@ END echo "💡 Superuser Username: ${SUPERUSER_NAME}, E-Mail: ${SUPERUSER_EMAIL}" fi +./manage.py shell --interface python <