Compare commits
3 commits
bc483e6fde
...
d3960c0746
Author | SHA1 | Date | |
---|---|---|---|
Jessica Canady | d3960c0746 | ||
Jessica Canady | a89aac1f6d | ||
Jessica Canady | a3459135ba |
36
fly.toml
36
fly.toml
|
@ -10,26 +10,30 @@ kill_signal = 'SIGTERM'
|
||||||
[build]
|
[build]
|
||||||
|
|
||||||
[deploy]
|
[deploy]
|
||||||
release_command = '/app/bin/migrate'
|
release_command = '/app/bin/migrate'
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
PHX_HOST = 'jol.fly.dev'
|
PHX_HOST = 'jol.fly.dev'
|
||||||
PORT = '8080'
|
PORT = '8080'
|
||||||
|
|
||||||
[http_service]
|
[http_service]
|
||||||
internal_port = 8080
|
internal_port = 8080
|
||||||
force_https = true
|
force_https = true
|
||||||
auto_stop_machines = true
|
auto_stop_machines = "stop"
|
||||||
auto_start_machines = true
|
auto_start_machines = true
|
||||||
min_machines_running = 0
|
min_machines_running = 0
|
||||||
processes = ['app']
|
processes = ['app']
|
||||||
|
|
||||||
[http_service.concurrency]
|
[[http_service.checks]]
|
||||||
type = 'connections'
|
timeout = "30s"
|
||||||
hard_limit = 1000
|
grace_period = "5s"
|
||||||
soft_limit = 1000
|
|
||||||
|
[http_service.concurrency]
|
||||||
|
type = 'connections'
|
||||||
|
hard_limit = 1000
|
||||||
|
soft_limit = 1000
|
||||||
|
|
||||||
[[vm]]
|
[[vm]]
|
||||||
memory = '1gb'
|
memory = '1gb'
|
||||||
cpu_kind = 'shared'
|
cpu_kind = 'shared'
|
||||||
cpus = 1
|
cpus = 1
|
||||||
|
|
|
@ -4,10 +4,11 @@ defmodule JOLWeb.BlogController do
|
||||||
alias JOL.Blog
|
alias JOL.Blog
|
||||||
|
|
||||||
def index(conn, _params) do
|
def index(conn, _params) do
|
||||||
render(conn, "index.html", posts: Blog.recent_posts())
|
render(conn, "index.html", page_title: "You Asked For Posts", posts: Blog.recent_posts())
|
||||||
end
|
end
|
||||||
|
|
||||||
def show(conn, %{"slug" => slug}) do
|
def show(conn, %{"slug" => slug}) do
|
||||||
render(conn, "show.html", post: Blog.get_post_by_slug!(slug))
|
post = Blog.get_post_by_slug!(slug)
|
||||||
|
render(conn, "show.html", page_title: post.title, post: post)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue