Expose nginx container on localhost:8080; Use latest hub image.

This commit is contained in:
Joshua M. Dotson 2017-10-10 20:59:31 -04:00
parent d01fb311c6
commit 1075326cce
2 changed files with 10 additions and 12 deletions

View File

@ -12,21 +12,23 @@ To get NetBox up and running:
```
$ git clone -b master https://github.com/ninech/netbox-docker.git
$ cd netbox-docker
$ docker-compose up -d
$ docker-compose up
```
The application will be available after a few minutes.
Use `docker-compose port nginx 80` to find out where to connect to.
In another terminal:
```
$ echo "http://$(docker-compose port nginx 80)/"
http://0.0.0.0:32768/
# Try the REST API:
$ curl -L http://localhost:8080/api
{"circuits":"http://localhost:8080/api/circuits/","dcim":"http://localhost:8080/api/dcim/","extras":"http://localhost:8080/api/extras/","ipam":"http://localhost:8080/api/ipam/","secrets":"http://localhost:8080/api/secrets/","tenancy":"http://localhost:8080/api/tenancy/"}
# Open netbox in your default browser on macOS:
$ open "http://$(docker-compose port nginx 80)/"
$ open http://localhost:8080
# Open netbox in your default browser on (most) linuxes:
$ xdg-open "http://$(docker-compose port nginx 80)/" &>/dev/null &
$ xdg-open http://localhost:8080 &>/dev/null &
```
Default credentials:

View File

@ -1,11 +1,7 @@
version: '3'
services:
netbox:
build:
context: .
args:
- BRANCH=${BRANCH-master}
image: ninech/netbox:${BRANCH-latest}
image: ninech/netbox
depends_on:
- postgres
env_file: netbox.env
@ -18,7 +14,7 @@ services:
depends_on:
- netbox
ports:
- 80
- 127.0.0.1:8080:80
volumes:
- netbox-static-files:/opt/netbox/netbox/static
- netbox-nginx-config:/etc/netbox-nginx/