-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seeds.exs ... tidy/improve initialising data into auth db #174
Comments
I'm in favour of option two. Some comments I have to make this easier on others setting up the app:
|
Great suggestions. Totally agree. 🙌 |
Going to try and make a start on this. 🤞 ⏳ |
Made an attempt to move |
Co-authored-by: Simon <[email protected]>
PR #175 is now merged into main |
@SimonLab thanks for reviewing/merging. 🙌 With
|
Tested the new Works as expected. ✅ |
The "on-boarding" for the
auth
App suuuuuuuuucks! 😢while
attempting tofly deploy
theauth
app to Fly.io we noted that theseeds.exs
file was not being executed: #172 (comment) this means there is noapp
created in the DB:so the home page does not even render. 💔
Re-reading the
/priv/repo/seeds.exs
file I can see the intent ...but I'm embarrassed by how messy it is and I apologise to anyone who has attempted to read/grok it ... 🤦♂️
100% mea culpa! Didn't think the
seeds.exs
code was going to be looked at very often so didn't invest enough time in it. ⏳Related to: "Updated instructions needed ..." #157, "More clarity ..." #149 and "How to resolve
auth_plug
dependency #170Possible approaches to solve this
My initial assessment is that we can approach solving this in (at least) 4 different ways, in order of increasing effort/time:
seeds.exs
file which is currently only 147 lines of code./lib
where it will be executable by themix release
new
that outputs raw SQL that we can run directly on the DBhttps://stackoverflow.com/questions/36770956/how-can-i-see-the-raw-sql-generated-for-an-ecto-query
Ecto.Adapters.SQL.to_sql/3
superadmin
of the status of theirauth
instance.i. Creates the "default" app if it does not already exist. This will only happen once. >> INIT: Auth App Deployment Init Page [MVP] #176
ii. Displays the
AUTH_API_KEY
for the default app so it can be exported as an environment variableiii. Once the
AUTH_API_KEY
environment variable is set, display this detail on the "status" page.iv. Check all the other environment variables are defined so that the person setting up the
auth
app knows the status.Todo
Discuss & Decide which approach we are going to take to fixing the
seeds.exs
problem in both the short-term and longer term.Implement the chosen solution.
Test it on
localhost
and HerokuTest by deploying to Fly.io ... Deploy Auth to Fly.io PROD #172
The text was updated successfully, but these errors were encountered: