feat: set up deploys with fly
Signed-off-by: Amogh Lele <amogh@dyte.io>
This commit is contained in:
parent
f67e8cf6f9
commit
82e4d19e6c
@ -1,4 +1,4 @@
|
|||||||
use Mix.Config
|
import Config
|
||||||
|
|
||||||
# For production, don't forget to configure the url host
|
# For production, don't forget to configure the url host
|
||||||
# to something meaningful, Phoenix uses this information
|
# to something meaningful, Phoenix uses this information
|
||||||
|
@ -17,7 +17,7 @@ config :ketbin, Ketbin.Repo,
|
|||||||
url: database_url,
|
url: database_url,
|
||||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||||
cacertfile: "priv/cert.pem"
|
cacertfile: "priv/cert.pem"
|
||||||
|
PGPASSWORD=b7gjdl5bwx8e5gf5 pg_dump -U doadmin -W -F p postgres -h db-katbin-do-user-3351914-0.b.db.ondigitalocean.com -p 25060 > katbin.sql
|
||||||
secret_key_base =
|
secret_key_base =
|
||||||
System.get_env("SECRET_KEY_BASE") ||
|
System.get_env("SECRET_KEY_BASE") ||
|
||||||
raise """
|
raise """
|
||||||
|
45
fly.toml
Normal file
45
fly.toml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# fly.toml file generated for katbin on 2022-05-06T17:46:21+05:30
|
||||||
|
|
||||||
|
app = "katbin"
|
||||||
|
|
||||||
|
kill_signal = "SIGTERM"
|
||||||
|
kill_timeout = 5
|
||||||
|
processes = []
|
||||||
|
|
||||||
|
# [deploy]
|
||||||
|
# release_command = "/app/bin/migrate"
|
||||||
|
|
||||||
|
[env]
|
||||||
|
PHX_HOST = "katbin.fly.dev"
|
||||||
|
PORT = "8080"
|
||||||
|
|
||||||
|
[experimental]
|
||||||
|
allowed_public_ports = []
|
||||||
|
auto_rollback = true
|
||||||
|
|
||||||
|
[[services]]
|
||||||
|
http_checks = []
|
||||||
|
internal_port = 8080
|
||||||
|
processes = ["app"]
|
||||||
|
protocol = "tcp"
|
||||||
|
script_checks = []
|
||||||
|
|
||||||
|
[services.concurrency]
|
||||||
|
hard_limit = 25
|
||||||
|
soft_limit = 20
|
||||||
|
type = "connections"
|
||||||
|
|
||||||
|
[[services.ports]]
|
||||||
|
force_https = true
|
||||||
|
handlers = ["http"]
|
||||||
|
port = 80
|
||||||
|
|
||||||
|
[[services.ports]]
|
||||||
|
handlers = ["tls", "http"]
|
||||||
|
port = 443
|
||||||
|
|
||||||
|
[[services.tcp_checks]]
|
||||||
|
grace_period = "1s"
|
||||||
|
interval = "15s"
|
||||||
|
restart_limit = 0
|
||||||
|
timeout = "2s"
|
3
rel/overlays/bin/server
Executable file
3
rel/overlays/bin/server
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd -P -- "$(dirname -- "$0")"
|
||||||
|
PHX_SERVER=true exec ./ketbin start
|
2
rel/overlays/bin/server.bat
Executable file
2
rel/overlays/bin/server.bat
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
set PHX_SERVER=true
|
||||||
|
call "%~dp0\ketbin" start
|
Loading…
Reference in New Issue
Block a user