Add following line
-
-
Save tieubao/4c26616c998ef5fb78ed64fe246f9733 to your computer and use it in GitHub Desktop.
Configurations for Phoenix Framework 'Deploy To Heroku' button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Shield", | |
"description": "OAuth2 provider microservice endpoints.", | |
"repository": "https://github.com/mustafaturan/shield", | |
"keywords": ["phoenix", "ecto", "shield"], | |
"buildpacks": [ | |
{ | |
"url": "https://github.com/HashNuke/heroku-buildpack-elixir.git" | |
} | |
], | |
"env": { | |
"SECRET_KEY_BASE": { | |
"description": "A secret key for verifying the integrity of signed cookies.", | |
"generator": "secret" | |
}, | |
"POOL_SIZE": { | |
"description": "Database pool size", | |
"value": "10" | |
} | |
}, | |
"addons": [ | |
"heroku-postgresql" | |
], | |
"scripts": { | |
"postdeploy": "MIX_ENV=prod mix ecto.migrate" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Erlang version | |
erlang_version=19.0 | |
# Elixir version | |
elixir_version=1.3.0 | |
# Always rebuild from scratch on every deploy? | |
always_rebuild=true | |
# Export heroku config vars | |
config_vars_to_export=(DATABASE_URL POOL_SIZE SECRET_KEY_BASE) | |
# A command to run right before compiling the app (after elixir, .etc) | |
pre_compile="pwd" | |
# A command to run right after compiling the app | |
post_compile="pwd" | |
# Set the path the app is run from | |
runtime_path=/app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: MIX_ENV=prod mix phoenix.server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File path: config/prod.exs | |
use Mix.Config | |
config :your_app, YourApp.Endpoint, | |
http: [port: System.get_env("PORT")], | |
url: [scheme: System.get_env("SCHEME"), host: System.get_env("HOST_NAME"), port: 443] | |
# Do not print debug messages in production | |
config :logger, level: :info | |
config :your_app, YourApp.Endpoint, | |
secret_key_base: System.get_env("SECRET_KEY_BASE") | |
config :your_app, YourApp.Repo, | |
adapter: Ecto.Adapters.Postgres, | |
url: System.get_env("DATABASE_URL"), | |
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "20"), | |
ssl: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment