2017-04-19 16:48:21 +02:00
|
|
|
|
# netbox-docker
|
|
|
|
|
|
2017-09-29 11:07:52 +02:00
|
|
|
|
[![Build Status](https://travis-ci.org/ninech/netbox-docker.svg?branch=master)](https://travis-ci.org/ninech/netbox-docker)
|
|
|
|
|
|
2017-09-11 15:30:52 +02:00
|
|
|
|
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.
|
2017-04-19 16:48:21 +02:00
|
|
|
|
|
|
|
|
|
## Quickstart
|
|
|
|
|
|
|
|
|
|
To get NetBox up and running:
|
|
|
|
|
|
|
|
|
|
```
|
2017-09-11 15:40:11 +02:00
|
|
|
|
$ git clone -b master https://github.com/ninech/netbox-docker.git
|
2017-09-11 15:30:52 +02:00
|
|
|
|
$ cd netbox-docker
|
|
|
|
|
$ docker-compose up -d
|
2017-04-19 16:48:21 +02:00
|
|
|
|
```
|
|
|
|
|
|
2017-09-11 15:30:52 +02:00
|
|
|
|
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 &
|
|
|
|
|
```
|
2017-04-19 16:48:21 +02:00
|
|
|
|
|
|
|
|
|
Default credentials:
|
|
|
|
|
|
|
|
|
|
* Username: **admin**
|
|
|
|
|
* Password: **admin**
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
2017-09-11 15:30:52 +02:00
|
|
|
|
You can configure the app using environment variables. These are defined in `netbox.env`.
|
|
|
|
|
|
|
|
|
|
## Rebuilding & Publishing images
|
|
|
|
|
|
|
|
|
|
`./build.sh` is used to rebuild the Docker image:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ ./build.sh --help
|
|
|
|
|
Usage: ./build.sh <branch> [--push]
|
|
|
|
|
branch The branch or tag to build. Required.
|
|
|
|
|
--push Pushes built Docker image to docker hub.
|
|
|
|
|
|
|
|
|
|
You can use the following ENV variables to customize the build:
|
|
|
|
|
BRANCH The branch to build.
|
|
|
|
|
Also used for tagging the image.
|
|
|
|
|
DOCKER_REPO The Docker registry (i.e. hub.docker.com/r/DOCKER_REPO/netbox)
|
|
|
|
|
Also used for tagging the image.
|
|
|
|
|
Default: ninech
|
|
|
|
|
SRC_REPO Which fork of netbox to use (i.e. github.com/<SRC_REPO>/netbox).
|
|
|
|
|
Default: digitalocean
|
|
|
|
|
URL Where to fetch the package from.
|
|
|
|
|
Must be a tar.gz file of the source code.
|
|
|
|
|
Default: https://github.com/${SRC_REPO}/netbox/archive/$BRANCH.tar.gz
|
|
|
|
|
```
|
2017-08-30 11:10:55 +02:00
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
|
|
|
|
|
To run the bundled test, use the `docker-compose.test.yml` file.
|
|
|
|
|
|
|
|
|
|
```
|
2017-09-11 15:30:52 +02:00
|
|
|
|
$ docker-compose -f docker-compose.test.yml run --rm app
|
2017-08-30 11:10:55 +02:00
|
|
|
|
```
|
2017-09-11 15:30:52 +02:00
|
|
|
|
|
|
|
|
|
## 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.
|