diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 70032b54d..000000000 --- a/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM python:2.7-wheezy - -WORKDIR /opt/netbox - -ARG BRANCH=v2-beta -ARG URL=https://github.com/digitalocean/netbox.git -RUN git clone --depth 1 $URL -b $BRANCH . && \ - apt-get update -qq && apt-get install -y libldap2-dev libsasl2-dev libssl-dev graphviz && \ - pip install gunicorn==17.5 && \ - pip install django-auth-ldap && \ - pip install -r requirements.txt - -ADD docker/docker-entrypoint.sh /docker-entrypoint.sh -ADD netbox/netbox/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py - -ENTRYPOINT [ "/docker-entrypoint.sh" ] - -ADD docker/gunicorn_config.py /opt/netbox/ -ADD docker/nginx.conf /etc/netbox-nginx/ -VOLUME ["/etc/netbox-nginx/"] diff --git a/README.md b/README.md index 66c35250b..e2a8e708c 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,5 @@ Please see [the documentation](http://netbox.readthedocs.io/en/stable/) for inst ## Alternative Installations -* [Docker container](http://netbox.readthedocs.io/en/stable/installation/docker/) +* [Docker container](https://github.com/digitalocean/netbox-docker) * [Heroku deployment](https://heroku.com/deploy?template=https://github.com/BILDQUADRAT/netbox/tree/heroku) (via [@mraerino](https://github.com/BILDQUADRAT/netbox/tree/heroku)) diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index d435066d6..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,53 +0,0 @@ -version: '2' - -services: - postgres: - image: postgres:9.6 - container_name: postgres - environment: - POSTGRES_USER: netbox - POSTGRES_PASSWORD: J5brHrAXFLQSif0K - POSTGRES_DB: netbox - netbox: - build: . - image: digitalocean/netbox - links: - - postgres - container_name: netbox - depends_on: - - postgres - environment: - SUPERUSER_NAME: admin - SUPERUSER_EMAIL: admin@example.com - SUPERUSER_PASSWORD: admin - ALLOWED_HOSTS: localhost - DB_NAME: netbox - DB_USER: netbox - DB_PASSWORD: J5brHrAXFLQSif0K - DB_HOST: postgres - SECRET_KEY: r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj - EMAIL_SERVER: localhost - EMAIL_PORT: 25 - EMAIL_USERNAME: foo - EMAIL_PASSWORD: bar - EMAIL_TIMEOUT: 10 - EMAIL_FROM: netbox@bar.com - NETBOX_USERNAME: guest - NETBOX_PASSWORD: guest - volumes: - - netbox-static-files:/opt/netbox/netbox/static - nginx: - image: nginx:1.11.1-alpine - links: - - netbox - container_name: nginx - command: nginx -g 'daemon off;' -c /etc/netbox-nginx/nginx.conf - depends_on: - - netbox - ports: - - 80:80 - volumes_from: - - netbox -volumes: - netbox-static-files: - driver: local diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh deleted file mode 100755 index 53e52ef04..000000000 --- a/docker/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -e - -# run db migrations (retry on error) -while ! /opt/netbox/netbox/manage.py migrate 2>&1; do - sleep 5 -done - -# create superuser silently -if [[ -z ${SUPERUSER_NAME} || -z ${SUPERUSER_EMAIL} || -z ${SUPERUSER_PASSWORD} ]]; then - SUPERUSER_NAME='admin' - SUPERUSER_EMAIL='admin@example.com' - SUPERUSER_PASSWORD='admin' - echo "Using defaults: Username: ${SUPERUSER_NAME}, E-Mail: ${SUPERUSER_EMAIL}, Password: ${SUPERUSER_PASSWORD}" -fi -echo "from django.contrib.auth.models import User; User.objects.create_superuser('${SUPERUSER_NAME}', '${SUPERUSER_EMAIL}', '${SUPERUSER_PASSWORD}')" | python /opt/netbox/netbox/manage.py shell - -# copy static files -/opt/netbox/netbox/manage.py collectstatic --no-input - -# start unicorn -gunicorn --log-level debug --debug --error-logfile /dev/stderr --log-file /dev/stdout -c /opt/netbox/gunicorn_config.py netbox.wsgi diff --git a/docker/gunicorn_config.py b/docker/gunicorn_config.py deleted file mode 100644 index 878841ac0..000000000 --- a/docker/gunicorn_config.py +++ /dev/null @@ -1,5 +0,0 @@ -command = '/usr/bin/gunicorn' -pythonpath = '/opt/netbox/netbox' -bind = '0.0.0.0:8001' -workers = 3 -user = 'root' diff --git a/docker/nginx.conf b/docker/nginx.conf deleted file mode 100644 index 2a794f314..000000000 --- a/docker/nginx.conf +++ /dev/null @@ -1,35 +0,0 @@ -worker_processes 1; - -events { - worker_connections 1024; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - sendfile on; - tcp_nopush on; - keepalive_timeout 65; - gzip on; - server_tokens off; - - server { - listen 80; - - server_name localhost; - - access_log off; - - location /static/ { - alias /opt/netbox/netbox/static/; - } - - location / { - proxy_pass http://netbox:8001; - proxy_set_header X-Forwarded-Host $server_name; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; - } - } -} diff --git a/docs/installation/docker.md b/docs/installation/docker.md deleted file mode 100644 index 00551a096..000000000 --- a/docs/installation/docker.md +++ /dev/null @@ -1,51 +0,0 @@ -This guide demonstrates how to build and run NetBox as a Docker container. It assumes that the latest versions of [Docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) are already installed in your host. - -# Quickstart - -To get NetBox up and running: - -```no-highlight -# git clone -b master https://github.com/digitalocean/netbox.git -# cd netbox -# docker-compose up -d -``` - -The application will be available on http://localhost/ after a few minutes. - -Default credentials: - -* Username: **admin** -* Password: **admin** - -# Configuration - -You can configure the app at runtime using variables (see `docker-compose.yml`). Possible environment variables include: - -* SUPERUSER_NAME -* SUPERUSER_EMAIL -* SUPERUSER_PASSWORD -* ALLOWED_HOSTS -* DB_NAME -* DB_USER -* DB_PASSWORD -* DB_HOST -* DB_PORT -* SECRET_KEY -* EMAIL_SERVER -* EMAIL_PORT -* EMAIL_USERNAME -* EMAIL_PASSWORD -* EMAIL_TIMEOUT -* EMAIL_FROM -* LOGIN_REQUIRED -* MAINTENANCE_MODE -* NETBOX_USERNAME -* NETBOX_PASSWORD -* PAGINATE_COUNT -* TIME_ZONE -* DATE_FORMAT -* SHORT_DATE_FORMAT -* TIME_FORMAT -* SHORT_TIME_FORMAT -* DATETIME_FORMAT -* SHORT_DATETIME_FORMAT diff --git a/mkdocs.yml b/mkdocs.yml index d0347c8ce..8b77b289d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,7 +8,6 @@ pages: - 'Web Server': 'installation/web-server.md' - 'LDAP (Optional)': 'installation/ldap.md' - 'Upgrading': 'installation/upgrading.md' - - 'Alternate Install: Docker': 'installation/docker.md' - 'Configuration': - 'Mandatory Settings': 'configuration/mandatory-settings.md' - 'Optional Settings': 'configuration/optional-settings.md'