-
-
Notifications
You must be signed in to change notification settings - Fork 30
Operations
Kat Marchán edited this page Sep 14, 2023
·
8 revisions
Our setup is basically fly.io + GitHub Actions + S3. Sentry is used for monitoring and logging errors on production. Additional third party services are listed in Application Notes.
- Deploying to main on Github triggers CI testing. After CI testing, Github Actions automatically deploys to staging/dev.
- Run
mix bump <major|minor|patch>
on main, which will bump the Banchan Art version accordinly.- That will trigger a new run, which will deploy to staging again; it also generates a GitHub Release with automatically-generated release notes based on merged pull requests.
- That Github Release then triggers a release to production.
- Login via Flyctl
fly auth login
- Verify access to servers
flyctl apps list
- Connect to relevant server, ie
fly ssh console -a banchan-dev --pty -C "/app/bin/banchan remote"
- after connecting to the server for the first time, you'll be able to connect with this shorter command
fly ssh console -a banchan-dev
- after connecting to the server for the first time, you'll be able to connect with this shorter command
Warning
This process is only for use if Github Actions breaks again.
Requires:
- Go to local repo.
- Ensure local repo is up to date.
-
mix deploy.dev
ormix deploy.prod
From the CLI
- For status: Run
flyctl machine status -a
plus the app name - For restart: Run
flyctl machine restart -a
plus the app name
Note
This restarts every server involved with the app name. Alternatively, you can restart individual machines via machine id.
See Flyctl Reference Guide for more commands to run.
- Dev Server Logs on Fly.io1
- Production Server Logs on Fly.io1
- Error Logs on Sentry.io2
- Oban Web3
- Phoenix Live Dashboard3
- Deployment settings exist in
fly.toml
,mix.exs
, andDockerfile
(not to be confused the one in.devcontainer
, which is for local dev).
Footnotes
1: Requires invite to Fly.io
2: Requires invite to Sentry.io
3: Requires user with dev permissions on production
Created and maintained by Banchan Art LLC, 2022.