Skip to content

Commit

Permalink
add fly deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RemoteRabbit committed Sep 19, 2023
1 parent eb3f5d9 commit 419d75a
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/fly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
5 changes: 1 addition & 4 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# fly.toml app configuration file generated for tristan-jahnke on 2023-09-18T20:22:15-05:00
# fly.toml app configuration file generated for tristan-jahnke on 2023-09-19T18:15:25-05:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
Expand All @@ -10,9 +10,6 @@ swap_size_mb = 512

[build]

[deploy]
release_command = "/app/bin/migrate"

[env]
PHX_HOST = "tristan-jahnke.fly.dev"
PORT = "8080"
Expand Down
8 changes: 8 additions & 0 deletions rel/env.bat.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off
rem Set the release to load code on demand (interactive) instead of preloading (embedded).
rem set RELEASE_MODE=interactive

rem Set the release to work across nodes.
rem RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none".
rem set RELEASE_DISTRIBUTION=name
rem set RELEASE_NODE=<%= @release.name %>
20 changes: 20 additions & 0 deletions rel/env.sh.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

# # Sets and enables heart (recommended only in daemon mode)
# case $RELEASE_COMMAND in
# daemon*)
# HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND"
# export HEART_COMMAND
# export ELIXIR_ERL_OPTIONS="-heart"
# ;;
# *)
# ;;
# esac

# # Set the release to load code on demand (interactive) instead of preloading (embedded).
# export RELEASE_MODE=interactive

# # Set the release to work across nodes.
# # RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none".
# export RELEASE_DISTRIBUTION=name
# export RELEASE_NODE=<%= @release.name %>
3 changes: 3 additions & 0 deletions rel/overlays/bin/server
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cd -P -- "$(dirname -- "$0")"
PHX_SERVER=true exec ./portfolio start
2 changes: 2 additions & 0 deletions rel/overlays/bin/server.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set PHX_SERVER=true
call "%~dp0\portfolio" start
8 changes: 8 additions & 0 deletions rel/remote.vm.args.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Customize flags given to the VM: https://www.erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here

## Increase number of concurrent ports/sockets
##+Q 65536

## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
8 changes: 8 additions & 0 deletions rel/vm.args.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Customize flags given to the VM: https://www.erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here

## Increase number of concurrent ports/sockets
##+Q 65536

## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10

0 comments on commit 419d75a

Please sign in to comment.