Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add instruction files

Adam Bogdał4a79d784f0f6
diff --git a/Gruntfile.js b/Gruntfile.js
index f0b2e07072..904a5378c1 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -18,4 +18,5 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-less');
grunt.registerTask('default', ['less']);
+ grunt.registerTask('heroku', ['less']);
};
diff --git a/Procfile b/Procfile
new file mode 100644
index 0000000000..35b94e05cf
--- /dev/null
+++ b/Procfile
@@ -0,0 +1 @@
+web: gunicorn saleor.wsgi.static --log-file -
\ No newline at end of file
diff --git a/README.md b/README.md
index 8626498e7b..7052120127 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,25 @@ Usage
`saleor` is a shortcut for running `python manage.py` so you can use it to execute all management commands.
+## Deploy to Heroku
+
+### First steps
+
+ $ heroku create --buildpack https://github.com/ddollar/heroku-buildpack-multi.git
+ $ heroku addons:add heroku-postgresql
+ $ heroku config:set SECRET_KEY='<your secret key here>'
+ $ heroku config:set ALLOWED_HOSTS='<your hosts here>'
+
+### Deploy
+
+ $ git push heroku master
+
+### Prepare the database
+
+ $ heroku run python manage.py migrate
+
+
+
Google Analytics
----------------
diff --git a/package.json b/package.json
index ba05aa3207..1c1d6d95b7 100644
--- a/package.json
+++ b/package.json
@@ -12,8 +12,12 @@
"url": "https://github.com/mirumee/saleor/issues"
},
"homepage": "http://getsaleor.com/",
+ "engines": {
+ "node": "0.10.x"
+ },
"devDependencies": {
"grunt": "~0.4.4",
+ "grunt-cli": "^0.1.13",
"grunt-contrib-less": "~0.11.0"
}
}
diff --git a/runtime.txt b/runtime.txt
new file mode 100644
index 0000000000..1dc44e8efe
--- /dev/null
+++ b/runtime.txt
@@ -0,0 +1 @@
+python-3.4.2
\ No newline at end of file
diff --git a/saleor/wsgi.py b/saleor/wsgi/__init__.py
similarity index 100%
rename from saleor/wsgi.py
rename to saleor/wsgi/__init__.py
diff --git a/saleor/wsgi/static.py b/saleor/wsgi/static.py
new file mode 100644
index 0000000000..460ac336d3
--- /dev/null
+++ b/saleor/wsgi/static.py
@@ -0,0 +1,9 @@
+import os
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")
+
+from django.core.wsgi import get_wsgi_application
+from whitenoise.django import DjangoWhiteNoise
+
+application = get_wsgi_application()
+application = DjangoWhiteNoise(application)