mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-10 13:12:40 +00:00
db libs refactored
This commit is contained in:
parent
1b652f3319
commit
2c3ec27115
|
@ -141,7 +141,7 @@ The known commands are:
|
|||
- `pid` Prints the operating system PID of the running system via a remote command
|
||||
- `version` Prints the release name and version to be booted
|
||||
|
||||
There are some useful database-related release tasks under `Bonfire.Repo.ReleaseTasks.` that can be run in an `iex` console (which you get to with `make rel.shell` followed by `bin/bonfire remote`, assuming the app is already running):
|
||||
There are some useful database-related release tasks under `EctoSparkles.ReleaseTasks.` that can be run in an `iex` console (which you get to with `make rel.shell` followed by `bin/bonfire remote`, assuming the app is already running):
|
||||
|
||||
- `migrate` runs all up migrations
|
||||
- `rollback(step)` roll back to step X
|
||||
|
@ -149,7 +149,7 @@ There are some useful database-related release tasks under `Bonfire.Repo.Release
|
|||
- `rollback_all` rolls back all migrations back to zero (caution: this means loosing all data)
|
||||
|
||||
For example:
|
||||
`iex> Bonfire.Repo.ReleaseTasks.migrate` to create your database if it doesn't already exist.
|
||||
`iex> EctoSparkles.ReleaseTasks.migrate` to create your database if it doesn't already exist.
|
||||
|
||||
#### Option A2 - Building your own Docker image
|
||||
|
||||
|
@ -189,7 +189,7 @@ For production, we recommend to set up a CI workflow to automate this, for an ex
|
|||
|
||||
- `cd _build/prod/rel/bonfire/`
|
||||
|
||||
- Create a database and run the migrations with `bin/bonfire eval 'Bonfire.Repo.ReleaseTasks.migrate()'`.
|
||||
- Create a database and run the migrations with `bin/bonfire eval 'EctoSparkles.ReleaseTasks.migrate()'`.
|
||||
- If you’re using RDS or some other locked down DB, you may need to run `CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public;` on your database with elevated privileges.
|
||||
|
||||
* You can check if your instance is configured correctly by running it with `bin/bonfire start`
|
||||
|
|
|
@ -129,7 +129,7 @@ The code is somewhat documented inline. You can generate HTML docs (using `Exdoc
|
|||
|
||||
- `./forks/` is used to hack on local copies of dependencies. You can clone a dependency from its git repo (like a bonfire extension) and use the local version during development, eg: `make dep.clone.local dep=bonfire_me repo=https://github.com/bonfire-networks/bonfire_me`
|
||||
|
||||
- You can migrate the DB when the app is running (useful in a release): `Bonfire.Repo.ReleaseTasks.migrate`
|
||||
- You can migrate the DB when the app is running (useful in a release): `EctoSparkles.ReleaseTasks.migrate`
|
||||
|
||||
### Usage under Windows (MSYS or CYGWIN)
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ bonfire_boundaries = "https://github.com/bonfire-networks/bonfire_boundaries#mai
|
|||
bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
||||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
ecto_shorts = "https://github.com/bonfire-networks/ecto_shorts#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
emote = "https://github.com/bonfire-networks/emote"
|
||||
paginator = "https://github.com/bonfire-networks/paginator"
|
||||
|
|
|
@ -38,7 +38,6 @@ bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
|||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
#tree_magic = "https://github.com/bonfire-networks/tree_magic.ex"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
ecto_shorts = "https://github.com/bonfire-networks/ecto_shorts#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
emote = "https://github.com/bonfire-networks/emote"
|
||||
paginator = "https://github.com/bonfire-networks/paginator"
|
||||
|
|
|
@ -36,7 +36,6 @@ bonfire_boundaries = "https://github.com/bonfire-networks/bonfire_boundaries#mai
|
|||
bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
||||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
ecto_shorts = "https://github.com/bonfire-networks/ecto_shorts#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
emote = "https://github.com/bonfire-networks/emote"
|
||||
paginator = "https://github.com/bonfire-networks/paginator"
|
||||
|
|
|
@ -36,7 +36,6 @@ bonfire_boundaries = "https://github.com/bonfire-networks/bonfire_boundaries#mai
|
|||
bonfire_files = "https://github.com/bonfire-networks/bonfire_files#main"
|
||||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
ecto_shorts = "https://github.com/bonfire-networks/ecto_shorts#main"
|
||||
ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
||||
emote = "https://github.com/bonfire-networks/emote"
|
||||
paginator = "https://github.com/bonfire-networks/paginator"
|
||||
|
|
|
@ -2,6 +2,7 @@ defmodule Bonfire.Application do
|
|||
|
||||
@sup_name Bonfire.Supervisor
|
||||
@name Mix.Project.config()[:name]
|
||||
@otp_app Bonfire.Common.Config.get!(:otp_app)
|
||||
@version Mix.Project.config()[:version]
|
||||
@repository Mix.Project.config()[:source_url]
|
||||
@deps Bonfire.Common.Extend.loaded_deps()
|
||||
|
@ -10,7 +11,7 @@ defmodule Bonfire.Application do
|
|||
|
||||
def start(_type, _args) do
|
||||
|
||||
Bonfire.Repo.LogSlow.setup()
|
||||
EctoSparkles.LogSlow.setup(@otp_app)
|
||||
|
||||
:telemetry.attach("oban-errors", [:oban, :job, :exception], &Bonfire.ObanLogger.handle_event/4, [])
|
||||
Oban.Telemetry.attach_default_logger()
|
||||
|
|
Loading…
Reference in a new issue