From 773ec630b4149928d9126a520a4822d86350c31b Mon Sep 17 00:00:00 2001 From: Stefan de Kooter Date: Wed, 6 Nov 2019 10:24:15 +0100 Subject: [PATCH 01/11] Add CONN_MAX_AGE to database connection settings Defaulting to 300 seconds for the database connection to avoid new connection setup roundtrip on consecutive requests --- configuration/configuration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configuration/configuration.py b/configuration/configuration.py index 14c5d83..bf941a4 100644 --- a/configuration/configuration.py +++ b/configuration/configuration.py @@ -37,6 +37,8 @@ DATABASE = { # PostgreSQL password 'HOST': os.environ.get('DB_HOST', 'localhost'), # Database server 'PORT': os.environ.get('DB_PORT', ''), # Database port (leave blank for default) + 'CONN_MAX_AGE': int(os.environ.get('DB_CONN_MAX_AGE', '300')), + # Database connection persistence } # This key is used for secure generation of random numbers and strings. It must never be exposed outside of this file. From feb810ab27bf459a54a3e2055e7c399ed478f1f5 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Mon, 11 Nov 2019 08:53:11 +0100 Subject: [PATCH 02/11] Fix #179 'libc not found' Gunicorn version 20 crashes in this docker image. So for now use a version <20. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fd42274..7ee1216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ WORKDIR /install RUN pip install --prefix="/install" --no-warn-script-location \ # gunicorn is used for launching netbox - gunicorn \ + 'gunicorn<20.0.0' \ greenlet \ eventlet \ # napalm is used for gathering information from network devices From c790ce595398daf3053c3d8ac25e48c1792effca Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Mon, 11 Nov 2019 10:26:33 +0100 Subject: [PATCH 03/11] Preparation for 0.19.3 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 61e6e92..b72b05e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.19.2 +0.19.3 From 0e2c50c374328c31e268dd41178fee9558b2fda7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Tue, 12 Nov 2019 11:56:22 +0100 Subject: [PATCH 04/11] A new issue category for feature/change requests --- .github/ISSUE_TEMPLATE/feature_request.md | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..65f31dd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,52 @@ +--- +name: Feature or Change Request +about: Request a new feature or a change of the current behavior +title: '' +labels: '' +assignees: '' + +--- + + + +## Desired Behavior + + +... + +## Contrast to Current Behavior + + +... + +## Changes Required + + +... + +## Discussion: Benefits and Drawbacks + + +... From caaa68234c66578cb89d012af621246e8a43c058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Sun, 17 Nov 2019 17:07:02 +0100 Subject: [PATCH 05/11] Adds more labels to the Dockerfile It also updates the README and the bug_report template to reflect the changes. Additionally, in the README some relevant shields from shields.io are added. The labels follow [label-schema.org][lsorg] and the [OpenContainer image spec, section annotations][ocis], specifications. [lsorg]: http://label-schema.org/rc1/ [ocis]: https://github.com/opencontainers/image-spec/blob/master/annotations.md --- .github/ISSUE_TEMPLATE/bug_report.md | 14 +++- Dockerfile | 33 ++++++++-- README.md | 46 ++++++++++++-- build.sh | 95 ++++++++++++++++++---------- 4 files changed, 142 insertions(+), 46 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 88437e0..a4771fa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -45,12 +45,22 @@ The output of `docker version`: `XXXXX` The output of `git rev-parse HEAD`: `XXXXX` The command you used to start the project: `XXXXX` + +The output of `docker inspect netboxcommunity/netbox:latest --format "{{json .ContainerConfig.Labels}}"`: + +```json +{ + "JSON JSON JSON": + "--> Please paste formatted json. (Use e.g. `jq` or https://jsonformatter.curiousconcept.com/)" +} +``` + The output of `docker-compose logs netbox`: -``` +```text LOG LOG LOG ``` @@ -60,6 +70,6 @@ Only if you have gotten a 5xx http error, else delete this section. If your log is very long, create a Gist instead (and post the link to it): https://gist.github.com --> -``` +```text LOG LOG LOG ``` diff --git a/Dockerfile b/Dockerfile index 7ee1216..d7a9af9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,11 +72,34 @@ ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ] CMD ["gunicorn", "-c /etc/netbox/config/gunicorn_config.py", "netbox.wsgi"] -LABEL NETBOX_DOCKER_PROJECT_VERSION="custom build" \ - NETBOX_BRANCH="custom build" \ - ORIGINAL_DOCKER_TAG="custom build" \ - NETBOX_GIT_COMMIT="not built from git" \ - NETBOX_GIT_URL="not built from git" +LABEL ORIGINAL_TAG="" \ + NETBOX_GIT_BRANCH="" \ + NETBOX_GIT_REF="" \ + NETBOX_GIT_URL="" \ +# See http://label-schema.org/rc1/#build-time-labels +# Also https://microbadger.com/labels + org.label-schema.schema-version="1.0" \ + org.label-schema.build-date="" \ + org.label-schema.name="Netbox Docker" \ + org.label-schema.description="A container based distribution of Netbox, the free and open IPAM and DCIM solution." \ + org.label-schema.vendor="The netbox-docker contributors." \ + org.label-schema.url="https://github.com/netbox-community/netbox-docker" \ + org.label-schema.usage="https://github.com/netbox-community/netbox-docker/wiki" \ + org.label-schema.vcs-url="https://github.com/netbox-community/netbox-docker.git" \ + org.label-schema.vcs-ref="" \ + org.label-schema.version="snapshot" \ +# See https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys + org.opencontainers.image.created="" \ + org.opencontainers.image.title="Netbox Docker" \ + org.opencontainers.image.description="A container based distribution of Netbox, the free and open IPAM and DCIM solution." \ + org.opencontainers.image.licenses="Apache-2.0" \ + org.opencontainers.image.authors="The netbox-docker contributors." \ + org.opencontainers.image.vendor="The netbox-docker contributors." \ + org.opencontainers.image.url="https://github.com/netbox-community/netbox-docker" \ + org.opencontainers.image.documentation="https://github.com/netbox-community/netbox-docker/wiki" \ + org.opencontainers.image.source="https://github.com/netbox-community/netbox-docker.git" \ + org.opencontainers.image.revision="" \ + org.opencontainers.image.version="snapshot" ##### ## LDAP specific configuration diff --git a/README.md b/README.md index e375bea..13f7241 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,45 @@ # netbox-docker +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/netbox-community/netbox-docker)][github-release] +[![GitHub stars](https://img.shields.io/github/stars/netbox-community/netbox-docker)][github-stargazers] +![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/netbox-community/netbox-docker) +![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/netboxcommunity/netbox) +![Docker Pulls](https://img.shields.io/docker/pulls/netboxcommunity/netbox) +[![MicroBadger Layers](https://img.shields.io/microbadger/layers/netboxcommunity/netbox)][netbox-docker-microbadger] +[![MicroBadger Size](https://img.shields.io/microbadger/image-size/netboxcommunity/netbox)][netbox-docker-microbadger] +[![GitHub license](https://img.shields.io/github/license/netbox-community/netbox-docker)][netbox-docker-license] + [The Github repository](netbox-docker-github) houses the components needed to build Netbox as a Docker container. Images are built using this code and are released to [Docker Hub][netbox-dockerhub] once a day. Do you have any questions? Before opening an issue on Github, please join the [Network To Code][ntc-slack] Slack and ask for help in our [`#netbox-docker`][netbox-docker-slack] channel. +[github-stargazers]: https://github.com/netbox-community/netbox-docker/stargazers +[github-release]: https://github.com/netbox-community/netbox-docker/releases +[netbox-docker-microbadger]: https://microbadger.com/images/netboxcommunity/netbox [netbox-dockerhub]: https://hub.docker.com/r/netboxcommunity/netbox/tags/ [netbox-docker-github]: https://github.com/netbox-community/netbox-docker/ [ntc-slack]: http://slack.networktocode.com/ [netbox-docker-slack]: https://slack.com/app_redirect?channel=netbox-docker&team=T09LQ7E9E +[netbox-docker-license]: https://github.com/netbox-community/netbox-docker/blob/master/LICENSE + +## Docker Tags + +* `vX.Y.Z`: Release builds, built from [releases of Netbox][netbox-releases]. +* `latest`: Release builds, built from [`master` branch of Netbox][netbox-master]. +* `snapshot`: Pre-release builds, built from the [`develop` branch of Netbox][netbox-develop]. +* `develop-X.Y`: Pre-release builds, built from the corresponding [branch of Netbox][netbox-branches]. + +Then there is currently one extra tags for each of the above labels: + +* `-ldap`: Contains additional dependencies and configurations for connecting Netbox to an LDAP directroy. + [Learn more about that in our wiki][netbox-docker-ldap]. + +[netbox-releases]: https://github.com/netbox-community/netbox/releases +[netbox-master]: https://github.com/netbox-community/netbox/tree/master +[netbox-develop]: https://github.com/netbox-community/netbox/tree/develop +[netbox-branches]: https://github.com/netbox-community/netbox/branches +[netbox-docker-ldap]: https://github.com/netbox-community/netbox-docker/wiki/LDAP ## Quickstart @@ -54,12 +85,12 @@ This project relies only on *Docker* and *docker-compose* meeting this requireme To ensure this, compare the output of `docker --version` and `docker-compose --version` with the requirements above. -## Reference Documentation +## Documentation -Please refer [to the wiki][wiki] for further information on how to use this Netbox Docker image properly. +Please refer [to our wiki on Github][netbox-docker-wiki] for further information on how to use this Netbox Docker image properly. It covers advanced topics such as using secret files, deployment to Kubernetes as well as NAPALM and LDAP configuration. -[wiki]: https://github.com/netbox-community/netbox-docker/wiki/ +[netbox-docker-wiki]: https://github.com/netbox-community/netbox-docker/wiki/ ## Netbox Version @@ -69,7 +100,7 @@ To use this feature, set the environment-variable `VERSION` before launching `do [any tag of the `netboxcommunity/netbox` Docker image on Docker Hub][netbox-dockerhub]. ```bash -export VERSION=v2.6.6 +export VERSION=v2.6.7 docker-compose pull netbox docker-compose up -d ``` @@ -78,7 +109,7 @@ You can also build a specific version of the Netbox Docker image yourself. `VERSION` can be any valid [git ref][git-ref] in that case. ```bash -export VERSION=v2.6.6 +export VERSION=v2.6.7 ./build.sh $VERSION docker-compose up -d ``` @@ -90,8 +121,9 @@ docker-compose up -d From time to time it might become necessary to re-engineer the structure of this setup. Things like the `docker-compose.yml` file or your Kubernetes or OpenShift configurations have to be adjusted as a consequence. -Since April 2018 each image built from this repo contains a `NETBOX_DOCKER_PROJECT_VERSION` label. -You can check the label of your local image by running `docker inspect netboxcommunity/netbox:v2.3.1 --format "{{json .ContainerConfig.Labels}}"`. +Since November 2019 each image built from this repo contains a `org.opencontainers.image.version` label. +(The images contained labels since April 2018, although in November 2019 the labels' names changed.) +You can check the label of your local image by running `docker inspect netboxcommunity/netbox:v2.6.7 --format "{{json .ContainerConfig.Labels}}"`. Please read [the release notes][releases] carefully when updating to a new image version. diff --git a/build.sh b/build.sh index 123cd17..7588332 100755 --- a/build.sh +++ b/build.sh @@ -30,23 +30,26 @@ if [ "${1}x" == "x" ] || [ "${1}" == "--help" ] || [ "${1}" == "-h" ]; then echo " When \${BRANCH}=master: latest" echo " When \${BRANCH}=develop: snapshot" echo " Else: same as \${BRANCH}" - echo " DOCKER_ORG The Docker registry (i.e. hub.docker.com/r/\${DOCKER_ORG}/\${DOCKER_REPO})" - echo " Also used for tagging the image." + echo " DOCKER_REGISTRY The Docker repository's registry (i.e. '\${DOCKER_REGISTRY}/\${DOCKER_ORG}/\${DOCKER_REPO}'')" + echo " Used for tagging the image." + echo " Default: docker.io" + echo " DOCKER_ORG The Docker repository's organisation (i.e. '\${DOCKER_REGISTRY}/\${DOCKER_ORG}/\${DOCKER_REPO}'')" + echo " Used for tagging the image." echo " Default: netboxcommunity" - echo " DOCKER_REPO The Docker registry (i.e. hub.docker.com/r/\${DOCKER_ORG}/\${DOCKER_REPO})" - echo " Also used for tagging the image." + echo " DOCKER_REPO The Docker repository's name (i.e. '\${DOCKER_REGISTRY}/\${DOCKER_ORG}/\${DOCKER_REPO}'')" + echo " Used for tagging the image." echo " Default: netbox" - echo " DOCKER_FROM The base image to use." - echo " Default: Whatever is defined as default in the Dockerfile." echo " DOCKER_TAG The name of the tag which is applied to the image." echo " Useful for pushing into another registry than hub.docker.com." - echo " Default: \${DOCKER_ORG}/\${DOCKER_REPO}:\${TAG}" + echo " Default: \${DOCKER_REGISTRY}/\${DOCKER_ORG}/\${DOCKER_REPO}:\${TAG}" echo " DOCKER_SHORT_TAG The name of the short tag which is applied to the" echo " image. This is used to tag all patch releases to their" echo " containing version e.g. v2.5.1 -> v2.5" - echo " Default: \${DOCKER_ORG}/\${DOCKER_REPO}:." + echo " Default: \${DOCKER_REGISTRY}/\${DOCKER_ORG}/\${DOCKER_REPO}:." echo " DOCKERFILE The name of Dockerfile to use." echo " Default: Dockerfile" + echo " DOCKER_FROM The base image to use." + echo " Default: Whatever is defined as default in the Dockerfile." echo " DOCKER_TARGET A specific target to build." echo " It's currently not possible to pass multiple targets." echo " Default: main ldap" @@ -98,12 +101,6 @@ else DRY="echo" fi -### -# read the project version from the `VERSION` file and trim it -# see https://stackoverflow.com/a/3232433/172132 -### -NETBOX_DOCKER_PROJECT_VERSION="${NETBOX_DOCKER_PROJECT_VERSION-$(sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' VERSION)}" - ### # variables for fetching the source ### @@ -152,9 +149,29 @@ if [ ! -f "${DOCKERFILE}" ]; then fi fi +### +# variables for labelling the docker image +### +BUILD_DATE="$(date --utc --iso-8601=minutes)" + +if [ -d ".git" ]; then + GIT_REF="$(git rev-parse HEAD)" +fi + +# read the project version from the `VERSION` file and trim it, see https://stackoverflow.com/a/3232433/172132 +PROJECT_VERSION="${PROJECT_VERSION-$(sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' VERSION)}" + +# Get the Git information from the netbox directory +if [ -d "${NETBOX_PATH}/.git" ]; then + NETBOX_GIT_REF=$(cd ${NETBOX_PATH}; git rev-parse HEAD) + NETBOX_GIT_BRANCH=$(cd ${NETBOX_PATH}; git rev-parse --abbrev-ref HEAD) + NETBOX_GIT_URL=$(cd ${NETBOX_PATH}; git remote get-url origin) +fi + ### # variables for tagging the docker image ### +DOCKER_REGISTRY="${DOCKER_REGISTRY-docker.io}" DOCKER_ORG="${DOCKER_ORG-netboxcommunity}" DOCKER_REPO="${DOCKER_REPO-netbox}" case "${BRANCH}" in @@ -182,7 +199,7 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do ### # composing the final TARGET_DOCKER_TAG ### - TARGET_DOCKER_TAG="${DOCKER_TAG-${DOCKER_ORG}/${DOCKER_REPO}:${TAG}}" + TARGET_DOCKER_TAG="${DOCKER_TAG-${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_REPO}:${TAG}}" if [ "${DOCKER_TARGET}" != "main" ]; then TARGET_DOCKER_TAG="${TARGET_DOCKER_TAG}-${DOCKER_TARGET}" fi @@ -196,10 +213,10 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do MAJOR=${BASH_REMATCH[1]} MINOR=${BASH_REMATCH[2]} - DOCKER_SHORT_TAG="${DOCKER_SHORT_TAG-${DOCKER_ORG}/${DOCKER_REPO}:v${MAJOR}.${MINOR}}" + TARGET_DOCKER_SHORT_TAG="${DOCKER_SHORT_TAG-${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_REPO}:v${MAJOR}.${MINOR}}" if [ "${DOCKER_TARGET}" != "main" ]; then - DOCKER_SHORT_TAG="${DOCKER_SHORT_TAG}-${DOCKER_TARGET}" + TARGET_DOCKER_SHORT_TAG="${TARGET_DOCKER_SHORT_TAG}-${DOCKER_TARGET}" fi fi @@ -216,25 +233,39 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do -f "${DOCKERFILE}" -t "${TARGET_DOCKER_TAG}" ) - if [ -n "${DOCKER_SHORT_TAG}" ]; then - DOCKER_BUILD_ARGS+=( -t "${DOCKER_SHORT_TAG}" ) + if [ -n "${TARGET_DOCKER_SHORT_TAG}" ]; then + DOCKER_BUILD_ARGS+=( -t "${TARGET_DOCKER_SHORT_TAG}" ) fi # --label - DOCKER_BUILD_ARGS+=( - --label "NETBOX_DOCKER_PROJECT_VERSION=${NETBOX_DOCKER_PROJECT_VERSION}" - --label "NETBOX_BRANCH=${BRANCH}" - --label "ORIGINAL_DOCKER_TAG=${TARGET_DOCKER_TAG}" - ) - if [ -d "${NETBOX_PATH}/.git" ]; then + if [ "${DOCKER_TARGET}" == "main" ]; then DOCKER_BUILD_ARGS+=( - --label "NETBOX_GIT_COMMIT=$($DRY cd "${NETBOX_PATH}"; $DRY git rev-parse HEAD)" - --label "NETBOX_GIT_URL=$($DRY cd "${NETBOX_PATH}"; $DRY git remote get-url origin)" + --label "ORIGINAL_TAG=${TARGET_DOCKER_TAG}" + + --label "org.label-schema.build-date=${BUILD_DATE}" + --label "org.opencontainers.image.created=${BUILD_DATE}" + + --label "org.label-schema.version=${PROJECT_VERSION}" + --label "org.opencontainers.image.version=${PROJECT_VERSION}" ) + if [ -d ".git" ]; then + DOCKER_BUILD_ARGS+=( + --label "org.label-schema.vcs-ref=${GIT_REF}" + --label "org.opencontainers.image.revision=${GIT_REF}" + ) + fi + if [ -d "${NETBOX_PATH}/.git" ]; then + DOCKER_BUILD_ARGS+=( + --label "NETBOX_GIT_BRANCH=${NETBOX_GIT_BRANCH}" + --label "NETBOX_GIT_REF=${NETBOX_GIT_REF}" + --label "NETBOX_GIT_URL=${NETBOX_GIT_URL}" + ) + fi fi # --build-arg - DOCKER_BUILD_ARGS+=( --build-arg "NETBOX_PATH=${NETBOX_PATH}" ) + DOCKER_BUILD_ARGS+=( --build-arg "NETBOX_PATH=${NETBOX_PATH}" ) + if [ -n "${DOCKER_FROM}" ]; then DOCKER_BUILD_ARGS+=( --build-arg "FROM=${DOCKER_FROM}" ) fi @@ -262,10 +293,10 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do $DRY docker push "${TARGET_DOCKER_TAG}" echo "✅ Finished pushing the Docker image '${TARGET_DOCKER_TAG}'." - if [ -n "$DOCKER_SHORT_TAG" ]; then - echo "⏫ Pushing '${DOCKER_SHORT_TAG}'" - $DRY docker push "${DOCKER_SHORT_TAG}" - echo "✅ Finished pushing the Docker image '${DOCKER_SHORT_TAG}'." + if [ -n "${TARGET_DOCKER_SHORT_TAG}" ]; then + echo "⏫ Pushing '${TARGET_DOCKER_SHORT_TAG}'" + $DRY docker push "${TARGET_DOCKER_SHORT_TAG}" + echo "✅ Finished pushing the Docker image '${TARGET_DOCKER_SHORT_TAG}'." fi fi done From 552676cc9d596c44ef05b02db01350134d944d85 Mon Sep 17 00:00:00 2001 From: Mark Honeychurch Date: Mon, 18 Nov 2019 12:20:39 +1300 Subject: [PATCH 06/11] Ignore local override file Adding an ignore rule for docker-compose.override.yml should allow people to clone this repo and use an override file to match their environment, without that file causing issues every time they pull a new version of the repo. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cbaffa8..4b029d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.sql.gz .netbox +docker-compose.override.yml From 02a5171e37f65cf9b5d3a59ba9efd102603a4778 Mon Sep 17 00:00:00 2001 From: "sylvain.petit" Date: Wed, 20 Nov 2019 10:09:02 +0100 Subject: [PATCH 07/11] Update Nginx 1.17.6-alpine docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 60a6a90..6a70af8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: - rqworker nginx: command: nginx -c /etc/netbox-nginx/nginx.conf - image: nginx:1.15-alpine + image: nginx:1.17.6-alpine depends_on: - netbox ports: From 08cda559a33b51d823d4cee4ead2ed65077ed408 Mon Sep 17 00:00:00 2001 From: EdenPark59 <35762460+edenpark59@users.noreply.github.com> Date: Wed, 20 Nov 2019 11:00:09 +0100 Subject: [PATCH 08/11] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6a70af8..f00700a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: - rqworker nginx: command: nginx -c /etc/netbox-nginx/nginx.conf - image: nginx:1.17.6-alpine + image: nginx:1.17-alpine depends_on: - netbox ports: From 34ce5be006e6eb034c8de408e82dec8739cb48ea Mon Sep 17 00:00:00 2001 From: Matt Olenik Date: Wed, 20 Nov 2019 13:25:31 -0800 Subject: [PATCH 09/11] Respect SKIP_GIT environment variable when building Fixes issue #190 --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 123cd17..7efb23e 100755 --- a/build.sh +++ b/build.sh @@ -111,12 +111,12 @@ SRC_ORG="${SRC_ORG-netbox-community}" SRC_REPO="${SRC_REPO-netbox}" BRANCH="${1}" URL="${URL-https://github.com/${SRC_ORG}/${SRC_REPO}.git}" +NETBOX_PATH="${NETBOX_PATH-.netbox}" ### # fetching the source ### -if [ "${2}" != "--push-only" ] ; then - NETBOX_PATH="${NETBOX_PATH-.netbox}" +if [ "${2}" != "--push-only" ] && [ -z "${SKIP_GIT}" ] ; then echo "🌐 Checking out '${BRANCH}' of netbox from the url '${URL}' into '${NETBOX_PATH}'" if [ ! -d "${NETBOX_PATH}" ]; then $DRY git clone -q --depth 10 -b "${BRANCH}" "${URL}" "${NETBOX_PATH}" From 29185fb9fdfa1fb6a8b557d16cd4dd78899e9a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Mon, 25 Nov 2019 17:09:37 +0100 Subject: [PATCH 10/11] reorganized docker ignore file .. and added some more files to it. --- .dockerignore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 1b2bacc..23492a4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,7 @@ +.git .github .travis.yml +*.md +env build* -*.env -.git +docker-compose.override.yml From c083baf640d0fe4f5a160e3435a2c3ec3e721107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Mon, 25 Nov 2019 17:11:37 +0100 Subject: [PATCH 11/11] Preparation for 0.19.4 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b72b05e..c0b8d59 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.19.3 +0.19.4