From 464d94db11667aeff802b26634f946edd262d87d Mon Sep 17 00:00:00 2001 From: mraerino Date: Wed, 4 Jan 2017 14:50:02 +0100 Subject: [PATCH] :sparkles: Add "Deploy to Heroku" button --- README.md | 2 ++ app.json | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 app.json diff --git a/README.md b/README.md index e4ba912a3..b57f357c6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ![NetBox](docs/netbox_logo.png "NetBox logo") +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) + NetBox is an IP address management (IPAM) and data center infrastructure management (DCIM) tool. Initially conceived by the network engineering team at [DigitalOcean](https://www.digitalocean.com/), NetBox was developed specifically to address the needs of network and infrastructure engineers. NetBox runs as a web application atop the [Django](https://www.djangoproject.com/) Python framework with a [PostgreSQL](http://www.postgresql.org/) database. For a complete list of requirements, see `requirements.txt`. The code is available [on GitHub](https://github.com/digitalocean/netbox). diff --git a/app.json b/app.json new file mode 100644 index 000000000..050b83a57 --- /dev/null +++ b/app.json @@ -0,0 +1,41 @@ +{ + "name": "Netbox", + "description": "NetBox is an IP address management (IPAM) and data center infrastructure management (DCIM) tool.", + "repository": "https://github.com/digitalocean/netbox", + "logo": "https://github.com/BILDQUADRAT/netbox/raw/heroku/docs/netbox_logo.png", + "keywords": ["netbox", "ipam", "dcim", "digitalocean"], + "scripts": { + "postdeploy": "./netbox/manage.py migrate && echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${ADMIN_USER}', '${ADMIN_EMAIL}', '${ADMIN_PASSWORD}')\" | ./netbox/manage.py shell" + }, + "env": { + "ALLOWED_HOSTS": { + "description": "Limit hosts allowed to be used for accessing the app", + "value": "*" + }, + "LOGIN_REQUIRED": { + "description": "If true, requires a login for every action", + "value": "true" + }, + "NETBOX_CONFIG": { + "description": "Which config to pick (always 'netbox.configuration_heroku')", + "value": "netbox.configuration_heroku" + }, + "SECRET_KEY": { + "description": "Secret key for Django cookies", + "generator": "secret" + }, + "ADMIN_USER": { + "description": "Username for the initial superuser", + "value": "" + }, + "ADMIN_EMAIL": { + "description": "Email address of the superuser", + "value": "" + }, + "ADMIN_PASSWORD": { + "description": "Initial password for the superuser", + "value": "" + } + }, + "addons": ["heroku-postgresql:hobby-dev"] +}