Skip to content

Commit

Permalink
refactor: cluster script
Browse files Browse the repository at this point in the history
  • Loading branch information
cao7113 committed Jul 19, 2024
1 parent c8d0234 commit 6f22b0e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Taskfile-fly-io.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ tasks:
# Opening https://fly.io/apps/hello-phx-up
board: fly dashboard
# Add a dedicated ipv4 with: fly ips allocate-v4
ips: fly ip private

## DB
# fly checks list -a hello-phx-up-db
Expand Down
3 changes: 2 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ tasks:
lv-help: task lv-start -- --help
lv-install: mix archive.install hex livebook
# https://fly.io/docs/elixir/advanced-guides/clustering-from-home-to-your-app-in-fly/
lv-fly-remote: ./cluster-with-remote.sh
lv-fly-remote: run/cluster-with-remote.sh
dns-query: dig hello-phx-up.internal aaaa

## DB Setup
pgcli: pgcli postgresql://postgres:postgres@localhost:5433
Expand Down
2 changes: 1 addition & 1 deletion lib/hello_phx/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule HelloPhx.Application do
# Start the Finch HTTP client for sending emails
{Finch, name: HelloPhx.Finch},
# setup for clustering
{Cluster.Supervisor, [topologies, [name: HelloPhx.ClusterSupervisor]]},
{Cluster.Supervisor, [topologies, name: HelloPhx.ClusterSupervisor]},
# Start a worker by calling: HelloPhx.Worker.start_link(arg)
# {HelloPhx.Worker, arg},
# Start to serve requests, typically the last entry
Expand Down
2 changes: 1 addition & 1 deletion lib/hello_phx_web/controllers/page_html/home.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<% end %>
</p>
<p>
Mode: <%= HelloPhx.build_mode() %> || <%= HelloPhx.commit() |> inspect %> on v<%= HelloPhx.vsn() %> || Locale: <%= @locale %>
Mode: <%= HelloPhx.build_mode() %> || v<%= HelloPhx.vsn() %> commit at: <%= HelloPhx.commit().commit_time %> head: <%= HelloPhx.commit().commit_id |> String.slice(0, 6) %> || Locale: <%= @locale %>
</p>

<p class="text-[2rem] mt-4 font-semibold leading-10 tracking-tighter text-zinc-900 text-balance">
Expand Down
File renamed without changes.

0 comments on commit 6f22b0e

Please sign in to comment.