From a1a7d1882810ee1ca18463e4ed5540f4bb523773 Mon Sep 17 00:00:00 2001 From: Semyon Maryasin Date: Sat, 22 Oct 2016 19:28:46 +0300 Subject: [PATCH 1/6] Added basic app.json --- app.json | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 00000000..8bdf6866 --- /dev/null +++ b/app.json @@ -0,0 +1,40 @@ +{ + "name": "ExMoney", + "description": "A self-hosted personal finance app", + "repository": "https://github.com/gaynetdinov/ex_money", + "keywords": ["financial", "money", "personal"], + "buildpacks": [ + {"url": "https://github.com/HashNuke/heroku-buildpack-elixir.git"}, + {"url": "https://github.com/gjaldon/heroku-buildpack-phoenix-static.git"} + ], + "addons": [ + "heroku-postgresql", + { + "plan": "scheduler", + "options": { + "__TODO": "properly add the job here?", + "__job": { + "frequency": "daily", + "command": "elixir lib/scripts/wakeup.exs" + } + } + } + ], + "env": { + "SECRET_KEY_BASE": { + }, + "CLIENT_ID": { + }, + "SERVICE_SECRET": { + }, + "SALTEDGE_KEY": { + }, + "HOME_URL": { + }, + "TZ": { + } + }, + "scripts": { + "postdeploy": "mix ecto.migrate" + } +} From 5985621e758eb966f4e4917fcbecf57cca88bbab Mon Sep 17 00:00:00 2001 From: Semyon Maryasin Date: Sat, 22 Oct 2016 19:30:24 +0300 Subject: [PATCH 2/6] added env var descriptions --- app.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.json b/app.json index 8bdf6866..f60924d5 100644 --- a/app.json +++ b/app.json @@ -22,16 +22,22 @@ ], "env": { "SECRET_KEY_BASE": { + "description": "Generate this key by running 'mix phoenix.gen.secret'" }, "CLIENT_ID": { + "description": "Grab it from your Saltedge profile: https://www.saltedge.com/clients/profile/secrets" }, "SERVICE_SECRET": { + "description": "Grab it from your Saltedge profile: https://www.saltedge.com/clients/profile/secrets" }, "SALTEDGE_KEY": { + "description": "Grab it from your Saltedge profile: https://www.saltedge.com/clients/profile/secrets" }, "HOME_URL": { + "description": "Hostname for your app e.g 'myapp.herokuapp.com'" }, "TZ": { + "description": "Your timezone, e.g. 'Europe/Berlin'" } }, "scripts": { From 65566da5c78fcef7257cb7f8f568a4cf2068651c Mon Sep 17 00:00:00 2001 From: Semyon Maryasin Date: Sat, 22 Oct 2016 19:53:59 +0300 Subject: [PATCH 3/6] use proper generator for secret key, fix descr --- app.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index f60924d5..f4eba157 100644 --- a/app.json +++ b/app.json @@ -22,7 +22,8 @@ ], "env": { "SECRET_KEY_BASE": { - "description": "Generate this key by running 'mix phoenix.gen.secret'" + "description": "Can be generated by running 'mix phoenix.gen.secret'", + "generator": "secret" }, "CLIENT_ID": { "description": "Grab it from your Saltedge profile: https://www.saltedge.com/clients/profile/secrets" @@ -31,7 +32,7 @@ "description": "Grab it from your Saltedge profile: https://www.saltedge.com/clients/profile/secrets" }, "SALTEDGE_KEY": { - "description": "Grab it from your Saltedge profile: https://www.saltedge.com/clients/profile/secrets" + "description": "Generate it with OpenSSL (https://docs.saltedge.com/guides/signature/)" }, "HOME_URL": { "description": "Hostname for your app e.g 'myapp.herokuapp.com'" From 1e1f544f7dc7d6bfeee95e29821a3af03045872e Mon Sep 17 00:00:00 2001 From: Semyon Maryasin Date: Mon, 24 Oct 2016 03:05:27 +0300 Subject: [PATCH 4/6] Improved descriptions for config vars --- app.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index f4eba157..2628d861 100644 --- a/app.json +++ b/app.json @@ -22,7 +22,7 @@ ], "env": { "SECRET_KEY_BASE": { - "description": "Can be generated by running 'mix phoenix.gen.secret'", + "description": "Can be generated by running 'mix phoenix.gen.secret', or auto-generated", "generator": "secret" }, "CLIENT_ID": { @@ -32,7 +32,7 @@ "description": "Grab it from your Saltedge profile: https://www.saltedge.com/clients/profile/secrets" }, "SALTEDGE_KEY": { - "description": "Generate it with OpenSSL (https://docs.saltedge.com/guides/signature/)" + "description": "Generate it with OpenSSL (https://docs.saltedge.com/guides/signature/) and copy&paste here" }, "HOME_URL": { "description": "Hostname for your app e.g 'myapp.herokuapp.com'" From e8d5ebe9b69af52f06f5a5248f083bd0700ae894 Mon Sep 17 00:00:00 2001 From: Semyon Maryasin Date: Mon, 24 Oct 2016 03:15:00 +0300 Subject: [PATCH 5/6] Added Heroku deploy button to readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index be51dfc9..06d0648f 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ Before using `ExMoney`, please make sure that `Saltedge` supports your bank [her Please check the [wiki page](https://github.com/gaynetdinov/ex_money/wiki) which describes how to use `ExMoney`. +You can deploy your own app instance on Heroku using this button, but make sure that you configure *Heroku Scheduler* addon manually afterwards - +consult [wiki](https://github.com/gaynetdinov/ex_money/wiki) for details. No need to run local instance though. +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) + ## Current state Currently `ExMoney` is a work-in-progress/prototype/'works on my machine' stage. From ff35315cea3a52d517e1a87a33ef5f696a677b3c Mon Sep 17 00:00:00 2001 From: Semyon Maryasin Date: Mon, 24 Oct 2016 03:15:36 +0300 Subject: [PATCH 6/6] Formatting fix --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 06d0648f..e3233a7d 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ Please check the [wiki page](https://github.com/gaynetdinov/ex_money/wiki) which You can deploy your own app instance on Heroku using this button, but make sure that you configure *Heroku Scheduler* addon manually afterwards - consult [wiki](https://github.com/gaynetdinov/ex_money/wiki) for details. No need to run local instance though. + [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) ## Current state