Skip to content

Commit

Permalink
Fix configuration scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
edgurgel committed Jul 13, 2019
1 parent ece43d5 commit 27bff9e
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 199 deletions.
21 changes: 14 additions & 7 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
use Mix.Config
import Config
if Mix.env == :test do
config :logger, backends: []
end

import System

config :poxa,
port: get_env("PORT") || 8080,
app_key: get_env("POXA_APP_KEY") || "app_key",
app_secret: get_env("POXA_SECRET") || "secret",
app_id: get_env("POXA_APP_ID") || "app_id",
registry_adapter: get_env("POXA_REGISTRY_ADAPTER") || "gproc",
web_hook: get_env("WEB_HOOK") || nil,
port: get_env("PORT", "8080") |> String.to_integer(),
app_key: get_env("POXA_APP_KEY", "app_key"),
app_secret: get_env("POXA_SECRET", "secret"),
app_id: get_env("POXA_APP_ID", "app_id"),
registry_adapter: get_env("POXA_REGISTRY_ADAPTER", "gproc"),
web_hook: get_env("WEB_HOOK", nil),
payload_limit: get_env("PAYLOAD_LIMIT") || 10_000

config :poxa, :ssl,
enabled: get_env("POXA_SSL", "false") == "true",
port: get_env("SSL_PORT", "8443") |> String.to_integer(),
cacertfile: get_env("SSL_CACERTFILE", ""),
certfile: get_env("SSL_CERTFILE", ""),
keyfile: get_env("SSL_KEYFILE", "")
44 changes: 0 additions & 44 deletions config/poxa.dev.conf

This file was deleted.

44 changes: 0 additions & 44 deletions config/poxa.prod.conf

This file was deleted.

104 changes: 0 additions & 104 deletions config/poxa.schema.exs

This file was deleted.

18 changes: 18 additions & 0 deletions config/releases.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Config
import System

config :poxa,
port: get_env("PORT", "8080") |> String.to_integer(),
app_key: get_env("POXA_APP_KEY", "app_key"),
app_secret: get_env("POXA_SECRET", "secret"),
app_id: get_env("POXA_APP_ID", "app_id"),
registry_adapter: get_env("POXA_REGISTRY_ADAPTER", "gproc"),
web_hook: get_env("WEB_HOOK", nil),
payload_limit: get_env("PAYLOAD_LIMIT") || 10_000

config :poxa, :ssl,
enabled: get_env("POXA_SSL", "false") == "true",
port: get_env("SSL_PORT", "8443") |> String.to_integer(),
cacertfile: get_env("SSL_CACERTFILE", ""),
certfile: get_env("SSL_CERTFILE", ""),
keyfile: get_env("SSL_KEYFILE", "")
6 changes: 6 additions & 0 deletions rel/env.bat.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
rem Set the release to work across nodes. If using the long name format like
rem the one below ([email protected]), you need to also uncomment the
rem RELEASE_DISTRIBUTION variable below.
rem set RELEASE_DISTRIBUTION=name
rem set RELEASE_NODE=<%= @release.name %>@127.0.0.1
14 changes: 14 additions & 0 deletions rel/env.sh.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# Sets and enables heart (recommended only in daemon mode)
# if [ "$RELEASE_COMMAND" = "daemon" ] || [ "$RELEASE_COMMAND" = "daemon_iex" ]; then
# HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND"
# export HEART_COMMAND
# export ELIXIR_ERL_OPTIONS="-heart"
# fi

# Set the release to work across nodes. If using the long name format like
# the one below ([email protected]), you need to also uncomment the
# RELEASE_DISTRIBUTION variable below.
# export RELEASE_DISTRIBUTION=name
# export RELEASE_NODE=<%= @release.name %>@127.0.0.1
11 changes: 11 additions & 0 deletions rel/vm.args.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Customize flags given to the VM: http://erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here

## Number of dirty schedulers doing IO work (file, sockets, etc)
##+SDio 5

## Increase number of concurrent ports/sockets
##+Q 65536

## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10

0 comments on commit 27bff9e

Please sign in to comment.