Skip to content

Commit

Permalink
Added heroku config
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserhussain1110 committed Apr 23, 2017
1 parent 200e5c9 commit 38b4284
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
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
15 changes: 12 additions & 3 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ use Mix.Config
# which you typically run after static files are built.
config :elixir_test_app, ElixirTestApp.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")

# Configure your database
config :elixir_test_app, ElixirTestApp.Repo,
adapter: Ecto.Adapters.Postgres,
url: System.get_env("DATABASE_URL"),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
ssl: true

# Do not print debug messages in production
config :logger, level: :info
Expand Down Expand Up @@ -58,4 +67,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 ElixirTestApp.UserSocket do
# channel "room:*", ElixirTestApp.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 38b4284

Please sign in to comment.