Skip to content

Commit

Permalink
Heroku deploy configs added
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserhussain1110 committed Apr 17, 2017
1 parent 3558c7b commit 2641116
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ erl_crash.dump
# secrets file as long as you replace its contents by environment
# variables.
/config/prod.secret.exs
/.idea
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: MIX_ENV=prod mix phoenix.server
7 changes: 5 additions & 2 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ use Mix.Config
config :test_app, TestApp.Endpoint,
http: [port: {:system, "PORT"}],
url: [host: "example.com", port: 80],
cache_static_manifest: "priv/static/manifest.json"
url: [scheme: "https", host: "my-elixir-test-app.herokuapp.com", port: 443],
force_ssl: [rewrite_on: [:x_forwarded_proto]],
cache_static_manifest: "priv/static/manifest.json",
secret_key_base: System.get_env("SECRET_KEY_BASE")

# Do not print debug messages in production
config :logger, level: :info
Expand Down Expand Up @@ -58,4 +61,4 @@ config :logger, level: :info

# Finally import the config/prod.secret.exs
# which should be versioned separately.
import_config "prod.secret.exs"
# import_config "prod.secret.exs"
3 changes: 2 additions & 1 deletion web/channels/user_socket.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ defmodule TestApp.UserSocket do
# channel "room:*", TestApp.RoomChannel

## Transports
transport :websocket, Phoenix.Transports.WebSocket
transport :websocket, Phoenix.Transports.WebSocket,
timeout: 45_000
# transport :longpoll, Phoenix.Transports.LongPoll

# Socket params are passed from the client and can
Expand Down

0 comments on commit 2641116

Please sign in to comment.