Skip to content

Commit

Permalink
Add heroku configs
Browse files Browse the repository at this point in the history
  • Loading branch information
barboza committed Aug 29, 2019
1 parent 6eedc1b commit 2248404
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python 2.7.16
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MIX_ENV=prod mix phx.server
2 changes: 1 addition & 1 deletion apps/chatter_web/lib/chatter_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule ChatterWeb.Endpoint do
socket "/live", Phoenix.LiveView.Socket

socket "/socket", ChatterWeb.UserSocket,
websocket: true,
websocket: [timeout: 45_000],
longpoll: false

# Serve at "/" the static files from "priv/static" directory.
Expand Down
3 changes: 2 additions & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ signing_salt =
# which you should run after static files are built and
# before starting your production server.
config :chatter_web, ChatterWeb.Endpoint,
url: [host: "example.com", port: 80],
url: [host: "chatter-liveview.herokuapp.com", port: 443],
force_ssl: [rewrite_on: [:x_forwarded_proto]],
cache_static_manifest: "priv/static/cache_manifest.json",
live_view: [
signing_salt: signing_salt
Expand Down
2 changes: 1 addition & 1 deletion config/prod.secret.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ database_url =
"""

config :chatter, Chatter.Repo,
# ssl: true,
ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")

Expand Down
6 changes: 6 additions & 0 deletions elixir_buildpack.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Elixir version
elixir_version=1.8.1

# Erlang version
# available versions https://github.com/HashNuke/heroku-buildpack-elixir-otp-builds/blob/master/otp-versions
erlang_version=21.2.5
1 change: 1 addition & 0 deletions phoenix_static_buildpack.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
phoenix_relative_path=apps/chatter_web

0 comments on commit 2248404

Please sign in to comment.