Expose nginx container on localhost:8080; Use latest hub image.
This commit is contained in:
parent
d01fb311c6
commit
1075326cce
14
README.md
14
README.md
@ -12,21 +12,23 @@ To get NetBox up and running:
|
|||||||
```
|
```
|
||||||
$ git clone -b master https://github.com/ninech/netbox-docker.git
|
$ git clone -b master https://github.com/ninech/netbox-docker.git
|
||||||
$ cd netbox-docker
|
$ cd netbox-docker
|
||||||
$ docker-compose up -d
|
$ docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
The application will be available 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.
|
|
||||||
|
In another terminal:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ echo "http://$(docker-compose port nginx 80)/"
|
# Try the REST API:
|
||||||
http://0.0.0.0:32768/
|
$ 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 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:
|
# 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:
|
Default credentials:
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
netbox:
|
netbox:
|
||||||
build:
|
image: ninech/netbox
|
||||||
context: .
|
|
||||||
args:
|
|
||||||
- BRANCH=${BRANCH-master}
|
|
||||||
image: ninech/netbox:${BRANCH-latest}
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
env_file: netbox.env
|
env_file: netbox.env
|
||||||
@ -18,7 +14,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- netbox
|
- netbox
|
||||||
ports:
|
ports:
|
||||||
- 80
|
- 127.0.0.1:8080:80
|
||||||
volumes:
|
volumes:
|
||||||
- netbox-static-files:/opt/netbox/netbox/static
|
- netbox-static-files:/opt/netbox/netbox/static
|
||||||
- netbox-nginx-config:/etc/netbox-nginx/
|
- netbox-nginx-config:/etc/netbox-nginx/
|
||||||
|
Loading…
Reference in New Issue
Block a user