1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
4be36943de
Oh FFS 2020-08-11 17:13:25 -04:00
6fceaadda5
Blegh 2020-08-11 17:08:08 -04:00
334e9b6ef8
Remove Procfile 2020-08-11 15:59:13 -04:00
c8b3516d62
Re-add Distillery 2020-08-11 15:55:13 -04:00
7a81ffad0b
Can we deploy without Distillery? 2020-08-11 15:49:54 -04:00
639771295c
Fix deploy 2020-08-11 14:59:34 -04:00
5 changed files with 70 additions and 13 deletions

View File

@ -5,19 +5,19 @@ config :chess, ChessWeb.Endpoint,
check_origin: ["https://chess.danbarber.me", "https://64squares.club"], check_origin: ["https://chess.danbarber.me", "https://64squares.club"],
http: [port: {:system, "PORT"}], http: [port: {:system, "PORT"}],
root: "./assets", root: "./assets",
secret_key_base: "${SECRET_KEY_BASE}", secret_key_base: System.get_env("SECRET_KEY_BASE"),
server: true, server: true,
url: [scheme: "https", host: "${HOST}", port: "${URL_PORT}"], url: [scheme: "https", host: System.get_env("HOST"), port: System.get_env("URL_PORT")],
version: Application.spec(:chess, :vsn) version: Application.spec(:chess, :vsn)
config :chess, Chess.Mailer, config :chess, Chess.Mailer,
adapter: Bamboo.MailgunAdapter, adapter: Bamboo.MailgunAdapter,
api_key: "${MAILGUN_API_KEY}", api_key: System.get_env("MAILGUN_API_KEY"),
domain: "${MAILGUN_DOMAIN}" domain: System.get_env("MAILGUN_DOMAIN")
config :chess, Chess.Repo, config :chess, Chess.Repo,
adapter: Ecto.Adapters.Postgres, adapter: Ecto.Adapters.Postgres,
url: "${DATABASE_URL}", url: System.get_env("DATABASE_URL"),
database: "", database: "",
ssl: true, ssl: true,
pool_size: 1 pool_size: 1

View File

@ -2,19 +2,19 @@
# They can then be used by adding `plugin MyPlugin` to # They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where # either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module. # `MyPlugin` is the name of the plugin module.
["rel", "plugins", "*.exs"] ~w(rel plugins *.exs)
|> Path.join() |> Path.join()
|> Path.wildcard() |> Path.wildcard()
|> Enum.map(&Code.eval_file(&1)) |> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config, use Distillery.Releases.Config,
# This sets the default release built by `mix release` # This sets the default release built by `mix distillery.release`
default_release: :default, default_release: :default,
# This sets the default environment used by `mix release` # This sets the default environment used by `mix distillery.release`
default_environment: Mix.env() default_environment: Mix.env()
# For a full list of config options for both releases # For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/configuration.html # and environments, visit https://hexdocs.pm/distillery/config/distillery.html
# You may define one or more environments in this file, # You may define one or more environments in this file,
@ -31,18 +31,19 @@ environment :dev do
# dev mode. # dev mode.
set dev_mode: true set dev_mode: true
set include_erts: false set include_erts: false
set cookie: :"?Oxo8uJ@&D@Sw@`NN!<5rFxVDA)JO1r$OT{{Py79R9`C4&DRNM~%joji8B2%&TCe" set cookie: :"CK%$*pAXF%$X]|ceC%xi:QDqt_${^0@ZyUOv}dp4Ld9{WH7h*JM<R~EP4sUr^OD="
end end
environment :prod do environment :prod do
set include_erts: true set include_erts: true
set include_src: false set include_src: false
set cookie: :";IXx6btpc8P4w2LQl*Zq4aD%.`*:k!^|,W=:_21,T?v!Bd0i=NfVv~3J>awv|7^$" set cookie: :"lhX:Fbp>xJ&V;50V~CY<vA7Wtf!T)N_A:O!9s$.G@jOAL=hxYF*qL;ksj|m^Y!e^"
set vm_args: "rel/vm.args"
end end
# You may define one or more releases in this file. # You may define one or more releases in this file.
# If you have not set a default release, or selected one # If you have not set a default release, or selected one
# when running `mix release`, the first release in the file # when running `mix distillery.release`, the first release in the file
# will be used by default # will be used by default
release :chess do release :chess do

23
rel/config/config.exs Normal file
View File

@ -0,0 +1,23 @@
use Mix.Config
config :chess, ChessWeb.Endpoint,
cache_static_manifest: "priv/static/cache_manifest.json",
check_origin: ["https://chess.danbarber.me", "https://64squares.club"],
http: [port: {:system, "PORT"}],
root: "./assets",
secret_key_base: "${SECRET_KEY_BASE}",
server: true,
url: [scheme: "https", host: "${HOST}", port: "${URL_PORT}"],
version: Application.spec(:chess, :vsn)
config :chess, Chess.Mailer,
adapter: Bamboo.MailgunAdapter,
api_key: "${MAILGUN_API_KEY}",
domain: "${MAILGUN_DOMAIN}"
config :chess, Chess.Repo,
adapter: Ecto.Adapters.Postgres,
url: "${DATABASE_URL}",
database: "",
ssl: true,
pool_size: 1

3
rel/plugins/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.*
!*.exs
!.gitignore

30
rel/vm.args Normal file
View File

@ -0,0 +1,30 @@
## This file provide the arguments provided to the VM at startup
## You can find a full list of flags and their behaviours at
## http://erlang.org/doc/man/erl.html
## Name of the node
-name <%= release_name %>@127.0.0.1
## Cookie for distributed erlang
-setcookie <%= release.profile.cookie %>
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
## (Disabled by default..use with caution!)
##-heart
## Enable kernel poll and a few async threads
##+K true
##+A 5
## For OTP21+, the +A flag is not used anymore,
## +SDio replace it to use dirty schedulers
##+SDio 5
## Increase number of concurrent ports/sockets
##-env ERL_MAX_PORTS 4096
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
# Enable SMP automatically based on availability
# On OTP21+, this is not needed anymore.
-smp auto