Browse files

Add distillery and configs

  • Loading branch information...
picandocodigo committed Dec 13, 2017
1 parent e2b9b77 commit 41901e1bcadc8b3dbfe63d7412377515cd638dd5
Showing with 66 additions and 47 deletions.
  1. +10 −46 apps/phoenix_app/config/prod.exs
  2. +1 −1 mix.exs
  3. +1 −0 mix.lock
  4. +54 −0 rel/config.exs
@@ -13,58 +13,22 @@ use Mix.Config
# containing the digested version of static files. This
# manifest is generated by the mix phx.digest task
# which you typically run after static files are built.
config :phoenix_app, PhoenixAppWeb.Endpoint,
load_from_system_env: true,
url: [host: "", port: 80],
cache_static_manifest: "priv/static/cache_manifest.json"
http: [:inet6, port: {:system, "PORT"}],
url: [host: "localhost", port: 80],
cache_static_manifest: "priv/static/cache_manifest.json",
server: true,
root: ".",
version: Application.spec(:phoenix_app, :vsn)
config :phoenix_app, authentication: [
username: {system: ,"BASIC_AUTH_USERNAME"},
password: {system: ,"BASIC_AUTH_PASSWORD"},
realm: {system: ,"BASIC_AUTH_REALM"}
username: {:system, "BASIC_AUTH_USERNAME"},
password: {:system, "BASIC_AUTH_PASSWORD"},
realm: {:system, "BASIC_AUTH_REALM"}
config :logger, level: :info
# ## SSL Support
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
# config :phoenix_app, PhoenixAppWeb.Endpoint,
# ...
# url: [host: "", port: 443],
# https: [:inet6,
# 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 return an absolute path to
# the key and cert in disk or a relative path inside priv,
# for example "priv/ssl/server.key".
# We also recommend setting `force_ssl`, ensuring no data is
# ever sent via http, always redirecting to https:
# config :phoenix_app, PhoenixAppWeb.Endpoint,
# force_ssl: [hsts: true]
# Check `Plug.SSL` for all available options in `force_ssl`.
# ## 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 :phoenix_app, PhoenixAppWeb.Endpoint, server: true
# Finally import the config/prod.secret.exs
# which should be versioned separately.
import_config "prod.secret.exs"
@@ -15,6 +15,6 @@ defmodule Paraguas.Mixfile do
# Run "mix help deps" for examples and options.
defp deps do
[{:distillery, "~> 1.5", runtime: false}]
@@ -1,6 +1,7 @@
%{"basic_auth": {:hex, :basic_auth, "2.2.2", "802748bd581c3ed836c66bd897478c84cd3d51ae16df227ed26a00d25b67a2af", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 0.14 or ~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"cowboy": {:hex, :cowboy, "1.1.2", "61ac29ea970389a88eca5a65601460162d370a70018afe6f949a29dca91f3bb0", [:rebar3], [{:cowlib, "~> 1.0.2", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3.2", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"},
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], [], "hexpm"},
"distillery": {:hex, :distillery, "1.5.2", "eec18b2d37b55b0bcb670cf2bcf64228ed38ce8b046bb30a9b636a6f5a4c0080", [:mix], [], "hexpm"},
"file_system": {:hex, :file_system, "0.2.2", "7f1e9de4746f4eb8a4ca8f2fbab582d84a4e40fa394cce7bfcb068b988625b06", [:mix], [], "hexpm"},
"gettext": {:hex, :gettext, "0.14.0", "1a019a2e51d5ad3d126efe166dcdf6563768e5d06c32a99ad2281a1fa94b4c72", [:mix], [], "hexpm"},
"mime": {:hex, :mime, "1.1.0", "01c1d6f4083d8aa5c7b8c246ade95139620ef8effb009edde934e0ec3b28090a", [:mix], [], "hexpm"},
@@ -0,0 +1,54 @@
# Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: Mix.env()
# For a full list of config options for both releases
# and environments, visit
# You may define one or more environments in this file,
# an environment's settings will override those of a release
# when building in that environment, this combination of release
# and environment configuration is called a profile
environment :dev do
# If you are running Phoenix, you should make sure that
# server: true is set and the code reloader is disabled,
# even in dev mode.
# It is recommended that you build with MIX_ENV=prod and pass
# the --env flag to Distillery explicitly if you want to use
# dev mode.
set dev_mode: true
set include_erts: false
set cookie: :"^b3:EfV{u>Rfx??JgrRw^6lTO{hpptpS]|Yv2hm~>N[IB><XvyF{ZShn*_rxDUZo"
environment :prod do
set include_erts: true
set include_src: false
set cookie: :";W^JBe|r10%%>?@&Y8XgVeZwH9kJ?w?bO/bl1!gjiD(P.<;2IkIz,[o<Mox:<.qg"
# You may define one or more releases in this file.
# If you have not set a default release, or selected one
# when running `mix release`, the first release in the file
# will be used by default
release :paraguas do
set version: "0.1.0"
set applications: [
greeter: :permanent,
phoenix_app: :permanent

0 comments on commit 41901e1

Please sign in to comment.