Here are the steps to update Phoenix Live SaaS Kit for Fly and Phoenix 1.6.9:
git init
,git add .
,git commit -m "init repo"
- Remove generated docker & deploy script files
build.sh
docker-entrypoint.sh
.dockerignore
Dockerfile
<!-- change this --> | |
<h1><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h1> | |
<!-- to this --> | |
<h1><%= gettext "Welcome to %{name}!", name: Map.get(@conn.private, :subdomain, "fresco") %></h1> |
plug Plug.Session, @session_options | |
plug FrescoWeb.Plugs.Subdomain # <---- | |
plug FrescoWeb.Router |
defmodule FrescoWeb.Plugs.Subdomain do | |
@behaviour Plug # see this for more on behaviours: https://elixir-lang.org/getting-started/typespecs-and-behaviours.html#behaviours | |
import Plug.Conn, only: [put_private: 3] | |
def init(_opts) do | |
%{ root_host: FrescoWeb.Endpoint.config(:url)[:host] } | |
end | |
def call(%Plug.Conn{host: host} = conn, %{root_host: root_host} = _opts) do |
config :fresco, FrescoWeb.Endpoint, | |
url: [host: "fresco.com"], # <---- | |
render_errors: [view: FrescoWeb.ErrorView, accepts: ~w(html json), layout: false], |
postgres: | |
image: postgres:9.4 | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
Here are the steps to update Phoenix Live SaaS Kit for Fly and Phoenix 1.6.9:
git init
, git add .
, git commit -m "init repo"
build.sh
docker-entrypoint.sh
.dockerignore
Dockerfile
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+cmd+r", | |
"command": "editor.action.startFindReplaceAction" | |
}, | |
{ | |
"key": "alt+cmd+f", | |
"command": "-editor.action.startFindReplaceAction" | |
}, |
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control
and E-Tag
headers, etc.), minification, etc.