-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile-fly-io.yml
49 lines (44 loc) · 1.48 KB
/
Taskfile-fly-io.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# https://taskfile.dev
version: "3"
## Fly.io https://hexdocs.pm/phoenix/fly.html
# https://fly.io/docs/elixir/getting-started/
vars:
APP: hello_phx
FLY_APP_NAME: hello-phx-up
FLY_DB_APP_NAME: hello-phx-up-db
tasks:
default: echo fly on app {{.FLY_APP_NAME}}
# IEx require mem: 512m+ on fly.io
sh: fly ssh console --pty -C "/app/bin/{{.APP}} remote"
ssh: fly ssh console
st: fly status
# deploy new app version
up: fly deploy --build-arg GIT_COMMIT_ID=$(git log -1 --format="%H") --build-arg GIT_COMMIT_TIME=$(git log -1 --format="%ct")
# task f:upv -- v0.1.6
upv: fly deploy --image ghcr.io/cao7113/hello-phx:{{.CLI_ARGS}} --debug --verbose
reup: fly app restart
log: fly logs
open: fly open
# create new app and fly.toml
launch: fly launch --debug --verbose # --now
vm: fly machine ls
ls: fly app ls
db: fly postgres connect -a {{.FLY_DB_APP_NAME}} --database hello_phx_up
db-users: fly postgres users list --app {{.FLY_DB_APP_NAME}}
# plain env and secrets
env: fly config env
sec: fly secrets ls
show: fly scale show
# fly scale count 2
# sets up a root certificate for your account and then issues a certificate.
ssh-agent: fly ssh issue --agent
# 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
db-check: fly checks list -a {{.FLY_DB_APP_NAME}}
# https://fly.io/docs/flyctl/install/
install: brew install flyctl
# fly auth login
# fly help