Merge pull request #5 from ninech/readme_overhaul
✏️ Overhaul of the README
This commit is contained in:
commit
0edd3d5489
85
README.md
85
README.md
|
@ -1,18 +1,31 @@
|
||||||
# netbox-docker
|
# netbox-docker
|
||||||
|
|
||||||
This repository houses the components needed to build NetBox as a Docker container. It is a work in progress; please submit a bug report for any issues you encounter.
|
This repository houses the components needed to build NetBox as a Docker container.
|
||||||
|
Images built using this code are released to [Docker Hub](https://hub.docker.com/r/ninech/netbox) every night.
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
To get NetBox up and running:
|
To get NetBox up and running:
|
||||||
|
|
||||||
```
|
```
|
||||||
# git clone -b master https://github.com/digitalocean/netbox-docker.git
|
$ git clone -b master https://github.com/digitalocean/netbox-docker.git
|
||||||
# cd netbox-docker
|
$ cd netbox-docker
|
||||||
# docker-compose up -d
|
$ docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
The application will be available on http://localhost/ after a few minutes.
|
The application will be available after a few minutes.
|
||||||
|
Use `docker-compose port nginx 80` to find out where to connect to.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo "http://$(docker-compose port nginx 80)/"
|
||||||
|
http://0.0.0.0:32768/
|
||||||
|
|
||||||
|
# Open netbox in your default browser on macOS:
|
||||||
|
$ open "http://$(docker-compose port nginx 80)/"
|
||||||
|
|
||||||
|
# Open netbox in your default browser on (most) linuxes:
|
||||||
|
$ xdg-open "http://$(docker-compose port nginx 80)/" &>/dev/null &
|
||||||
|
```
|
||||||
|
|
||||||
Default credentials:
|
Default credentials:
|
||||||
|
|
||||||
|
@ -21,41 +34,43 @@ Default credentials:
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can configure the app at runtime using variables (see `docker-compose.yml`). Possible environment variables include:
|
You can configure the app using environment variables. These are defined in `netbox.env`.
|
||||||
|
|
||||||
* SUPERUSER_NAME
|
## Rebuilding & Publishing images
|
||||||
* SUPERUSER_EMAIL
|
|
||||||
* SUPERUSER_PASSWORD
|
`./build.sh` is used to rebuild the Docker image:
|
||||||
* ALLOWED_HOSTS
|
|
||||||
* DB_NAME
|
```
|
||||||
* DB_USER
|
$ ./build.sh --help
|
||||||
* DB_PASSWORD
|
Usage: ./build.sh <branch> [--push]
|
||||||
* DB_HOST
|
branch The branch or tag to build. Required.
|
||||||
* DB_PORT
|
--push Pushes built Docker image to docker hub.
|
||||||
* SECRET_KEY
|
|
||||||
* EMAIL_SERVER
|
You can use the following ENV variables to customize the build:
|
||||||
* EMAIL_PORT
|
BRANCH The branch to build.
|
||||||
* EMAIL_USERNAME
|
Also used for tagging the image.
|
||||||
* EMAIL_PASSWORD
|
DOCKER_REPO The Docker registry (i.e. hub.docker.com/r/DOCKER_REPO/netbox)
|
||||||
* EMAIL_TIMEOUT
|
Also used for tagging the image.
|
||||||
* EMAIL_FROM
|
Default: ninech
|
||||||
* LOGIN_REQUIRED
|
SRC_REPO Which fork of netbox to use (i.e. github.com/<SRC_REPO>/netbox).
|
||||||
* MAINTENANCE_MODE
|
Default: digitalocean
|
||||||
* NETBOX_USERNAME
|
URL Where to fetch the package from.
|
||||||
* NETBOX_PASSWORD
|
Must be a tar.gz file of the source code.
|
||||||
* PAGINATE_COUNT
|
Default: https://github.com/${SRC_REPO}/netbox/archive/$BRANCH.tar.gz
|
||||||
* TIME_ZONE
|
```
|
||||||
* DATE_FORMAT
|
|
||||||
* SHORT_DATE_FORMAT
|
|
||||||
* TIME_FORMAT
|
|
||||||
* SHORT_TIME_FORMAT
|
|
||||||
* DATETIME_FORMAT
|
|
||||||
* SHORT_DATETIME_FORMAT
|
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
To run the bundled test, use the `docker-compose.test.yml` file.
|
To run the bundled test, use the `docker-compose.test.yml` file.
|
||||||
|
|
||||||
```
|
```
|
||||||
# docker-compose -f docker-compose.test.yml run --rm app
|
$ docker-compose -f docker-compose.test.yml run --rm app
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
This repository is currently maintained by [nine.ch](https://nine.ch).
|
||||||
|
|
||||||
|
[![nine.ch Logo](https://blog.nine.ch/assets/logo.png)](https://nine.ch)
|
||||||
|
|
||||||
|
We run your Linux server infrastructure – without interruptions, around the clock.
|
||||||
|
|
13
build.sh
13
build.sh
|
@ -4,17 +4,20 @@ set -e
|
||||||
|
|
||||||
if [ "${1}x" == "x" ] || [ "${1}" == "--help" ] || [ "${1}" == "-h" ]; then
|
if [ "${1}x" == "x" ] || [ "${1}" == "--help" ] || [ "${1}" == "-h" ]; then
|
||||||
echo "Usage: ${0} <branch> [--push]"
|
echo "Usage: ${0} <branch> [--push]"
|
||||||
echo " branch The branch or tag to build"
|
echo " branch The branch or tag to build. Required."
|
||||||
echo " --push Push built Docker files to docker hub"
|
echo " --push Pushes built Docker image to docker hub."
|
||||||
echo ""
|
echo ""
|
||||||
echo "You can use the following ENV variables to customize the build:"
|
echo "You can use the following ENV variables to customize the build:"
|
||||||
echo " SRC_REPO The Github repository (i.e. github.com/SRC_REPO/netbox) of netbox."
|
|
||||||
echo " DOCKER_REPO The Docker repository (i.e. hub.docker.com/r/DOCKER_REPO/netbox) "
|
|
||||||
echo " Also used for tagging the image."
|
|
||||||
echo " BRANCH The branch to build."
|
echo " BRANCH The branch to build."
|
||||||
echo " Also used for tagging the image."
|
echo " Also used for tagging the image."
|
||||||
|
echo " DOCKER_REPO The Docker registry (i.e. hub.docker.com/r/DOCKER_REPO/netbox) "
|
||||||
|
echo " Also used for tagging the image."
|
||||||
|
echo " Default: ninech"
|
||||||
|
echo " SRC_REPO Which fork of netbox to use (i.e. github.com/<SRC_REPO>/netbox)."
|
||||||
|
echo " Default: digitalocean"
|
||||||
echo " URL Where to fetch the package from."
|
echo " URL Where to fetch the package from."
|
||||||
echo " Must be a tar.gz file of the source code."
|
echo " Must be a tar.gz file of the source code."
|
||||||
|
echo " Default: https://github.com/\${SRC_REPO}/netbox/archive/\$BRANCH.tar.gz"
|
||||||
|
|
||||||
if [ "${1}x" == "x" ]; then
|
if [ "${1}x" == "x" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue