From 1075326ccec1285ab65cf93261486ce41b30687e Mon Sep 17 00:00:00 2001 From: "Joshua M. Dotson" Date: Tue, 10 Oct 2017 20:59:31 -0400 Subject: [PATCH] Expose nginx container on localhost:8080; Use latest hub image. --- README.md | 14 ++++++++------ docker-compose.yml | 8 ++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e1ab147..d04fdff 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/docker-compose.yml b/docker-compose.yml index 117925f..ff21eeb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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/