Skip to content

Commit

Permalink
Make app more dokku friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
Callum Barratt committed Feb 4, 2016
1 parent ac8f56c commit 6d270bf
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 69 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ erl_crash.dump
/priv/static/js

.DS_Store
config/prod.secret.exs
8 changes: 0 additions & 8 deletions .iex.ex

This file was deleted.

1 change: 1 addition & 0 deletions CHECKS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/ Health
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: mix phoenix.server
9 changes: 1 addition & 8 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config

# Configures the endpoint
config :callumapi, Callumapi.Endpoint,
url: [host: "localhost"],
root: Path.expand("..", __DIR__),
secret_key_base: "IGJNjwde2o+mgsVy0N1bxcc9C+joKls3pKA6sZD+MCk12AEMVTTAyjKPd8YCQfWp",
debug_errors: false,
pubsub: [name: Callumapi.PubSub,
adapter: Phoenix.PubSub.PG2]
debug_errors: false

# Configures Elixir's Logger
config :logger, :console,
Expand Down
40 changes: 2 additions & 38 deletions config/prod.exs
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
use Mix.Config

# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
config :callumapi, Callumapi.Endpoint,
http: [port: {:system, "PORT"}],
url: [host: "example.com"],
check_origin: false

# ## SSL Support
#
# To get SSL working, you will need to add the `https` key
# to the previous section:
#
# config:callumapi, Callumapi.Endpoint,
# ...
# https: [port: 443,
# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")]
#
# Where those two env variables point to a file on
# disk for the key and cert.
check_origin: false,
secret_key_base: System.get_env("SECRET_KEY_BASE")

# Do not print debug messages in production
config :logger, level: :info
Expand All @@ -32,20 +13,3 @@ config :logger, level: :info
config :callumapi, Callumapi.Repo,
adapter: Ecto.Adapters.Postgres,
url: {:system, "DATABASE_URL"}

# ## Using releases
#
# If you are doing OTP releases, you need to instruct Phoenix
# to start the server for all endpoints:
#
# config :phoenix, :serve_endpoints, true
#
# Alternatively, you can configure exactly which server to
# start per endpoint:
#
# config :callumapi, Callumapi.Endpoint, server: true
#

# Finally import the config/prod.secret.exs
# which should be versioned separately.
import_config "prod.secret.exs"
14 changes: 0 additions & 14 deletions config/prod.secret.exs

This file was deleted.

2 changes: 1 addition & 1 deletion elixir_buildpack.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ always_rebuild=false
config_vars_to_export=(DATABASE_URL)

# A command to run right after compiling the app
post_compile="pwd"
# post_compile="pwd"

0 comments on commit 6d270bf

Please sign in to comment.