diff --git a/cookiecutter.json b/cookiecutter.json
index f43940ce90a453aa73e4ddb508a991ba585307d6..03cd028cf9fa165786166dddc66a453bf8e8bb19 100644
--- a/cookiecutter.json
+++ b/cookiecutter.json
@@ -7,5 +7,6 @@
 	"project_short_description": "A flasky app.",
 	"use_pipenv": ["no", "yes"],
 	"python_version": ["3.7", "3.6"],
-	"node_version": ["12", "10", "8"]
+	"node_version": ["12", "10", "8"],
+	"deployment_on_heroku": ["no", "yes"]
 }
diff --git a/{{cookiecutter.app_name}}/Pipfile b/{{cookiecutter.app_name}}/Pipfile
index 427b8f291dbb58952f1c1c5dc31c444caf2b34ee..033e21464e54d00d59dcba659b8bb2fb43bc0d56 100644
--- a/{{cookiecutter.app_name}}/Pipfile
+++ b/{{cookiecutter.app_name}}/Pipfile
@@ -12,6 +12,9 @@ click = ">=5.0"
 # Database
 Flask-SQLAlchemy = "==2.4.1"
 SQLAlchemy = "==1.3.9"
+{%- if cookiecutter.deployment_on_heroku == "yes" %}
+psycopg2 = "==2.8.3"
+{%- endif %}
 
 # Migrations
 Flask-Migrate = "==2.5.2"
diff --git a/{{cookiecutter.app_name}}/Procfile b/{{cookiecutter.app_name}}/Procfile
index aaf74edf022cbd9fc176d4f7d3301b350e47bf84..56dc581449d87bfc7e75ebaa9f3f25f09caa8047 100644
--- a/{{cookiecutter.app_name}}/Procfile
+++ b/{{cookiecutter.app_name}}/Procfile
@@ -1 +1,2 @@
+release: flask db upgrade
 web: gunicorn {{cookiecutter.app_name}}.app:create_app\(\) -b 0.0.0.0:$PORT -w 3
diff --git a/{{cookiecutter.app_name}}/README.rst b/{{cookiecutter.app_name}}/README.rst
index dc15fac973cd6b9eb3e13dba79752b17938ed131..08a65149d5d8ceef564e4b89ee3ccc5cd0f2d2f6 100644
--- a/{{cookiecutter.app_name}}/README.rst
+++ b/{{cookiecutter.app_name}}/README.rst
@@ -135,3 +135,56 @@ should cache all your assets forever by including the following line
 in your ``settings.py``::
 
     SEND_FILE_MAX_AGE_DEFAULT = 31556926  # one year
+
+
+{%- if cookiecutter.deployment_on_heroku == "yes" %}
+Deployment on Heroku
+--------------------
+
+Before using automatic deployment on Heroku you have to add migrations to your repository.
+You can do it by using following commands ::
+
+    flask db init
+    flask db migrate
+    git add migrations/
+    git commit -m "Add migrations"
+    git commit push
+
+Make sure folder `migrations/versions` is not empty.
+
+Deploy to Heroku button
+^^^^^^^^^^^^^^^^^^^^^^^
+
+.. raw:: html
+
+    <a href="https://heroku.com/deploy"><img src="https://www.herokucdn.com/deploy/button.svg" title="Deploy" alt="Deploy"></a>
+
+
+Heroku CLI
+^^^^^^^^^^
+
+If you want deploy by using Heroku CLI:
+
+* create Heroku App. You can leave your app name, change it or leave it blank (random name will be generated)::
+
+    heroku create {{cookiecutter.app_name}}
+
+* add buildpacks::
+
+    heroku buildpacks:add --index=1 heroku/nodejs
+    heroku buildpacks:add --index=1 heroku/python
+
+* add Postgres database addon (it also sets `DATABASE_URL` environmental variable to created database)::
+
+    heroku addons:create heroku-postgresql:hobby-dev
+
+* set environmental variables (change secret key)::
+
+    heroku config:set SECRET_KEY=<secret-key>
+    heroku config:set FLASK_APP=autoapp.py
+
+* deploy on Heroku::
+
+    git push heroku master
+
+{%- endif %}
\ No newline at end of file
diff --git a/{{cookiecutter.app_name}}/app.json b/{{cookiecutter.app_name}}/app.json
new file mode 100644
index 0000000000000000000000000000000000000000..b13ea76c83e2632c7ea9bb5ed4cae624a706e247
--- /dev/null
+++ b/{{cookiecutter.app_name}}/app.json
@@ -0,0 +1,30 @@
+{
+   "name": "{{cookiecutter.app_name}}",
+   "repository": "https://github.com/{{cookiecutter.github_username}}/{{cookiecutter.app_name}}",
+   "env": {
+      "SECRET_KEY": {
+         "description": "SECRET_KEY.",
+         "generator": "secret"
+      },
+      "FLASK_APP": {
+         "description": "FLASK_APP.",
+         "value": "autoapp.py"
+      }
+   },
+   "buildpacks": [
+      {
+         "url": "heroku/nodejs"
+      },
+      {
+         "url": "heroku/python"
+      }
+   ],
+   "addons": [
+      {
+         "plan": "heroku-postgresql",
+         "options": {
+            "version": "11"
+         }
+      }
+   ]
+}
diff --git a/{{cookiecutter.app_name}}/package.json b/{{cookiecutter.app_name}}/package.json
index 45fb1e21b009e5b6636665df582749eac2aa7e94..d6a1f8565e73020558d68caffc0405c366544c62 100644
--- a/{{cookiecutter.app_name}}/package.json
+++ b/{{cookiecutter.app_name}}/package.json
@@ -7,7 +7,8 @@
     "start": "concurrently -n \"WEBPACK,FLASK\" -c \"bgBlue.bold,bgMagenta.bold\" \"npm run webpack-dev-server\" \"npm run flask-server\"",
     "webpack-dev-server": "NODE_ENV=debug webpack-dev-server --host=0.0.0.0 --port 2992 --hot --inline",
     "flask-server": "{% if cookiecutter.use_pipenv == 'yes' %}pipenv run {% endif %}flask run --host=0.0.0.0",
-    "lint": "eslint \"assets/js/*.js\""
+    "lint": "eslint \"assets/js/*.js\"",
+    "postinstall": "npm run build"
   },
   "repository": {
     "type": "git",
diff --git a/{{cookiecutter.app_name}}/requirements/prod.txt b/{{cookiecutter.app_name}}/requirements/prod.txt
index 86f1ffe6acc860a9dfbd18bd801c09160bb041be..4d6b143853d5974aed77606eb4788d7f6f855a88 100644
--- a/{{cookiecutter.app_name}}/requirements/prod.txt
+++ b/{{cookiecutter.app_name}}/requirements/prod.txt
@@ -8,6 +8,9 @@ click>=7.0
 # Database
 Flask-SQLAlchemy==2.4.1
 SQLAlchemy==1.3.9
+{%- if cookiecutter.deployment_on_heroku == "yes" %}
+psycopg2==2.8.3
+{%- endif %}
 
 # Migrations
 Flask-Migrate==2.5.2