-
Notifications
You must be signed in to change notification settings - Fork 36
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
[CHORE] Quickstart improvements #4448
[CHORE] Quickstart improvements #4448
Conversation
@@ -7,7 +7,7 @@ echo "## " | |||
if [ ! -f .devmode ]; then | |||
echo "## It looks like this is your first time using devmode. Lets gather some prerequisites..." && sleep 1 | |||
mix deps.get | |||
cd assets && yarn | |||
cd assets && yarn && yarn deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think yarn deploy is actually necessary here, these assets will be built when mix phx.server
is run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They weren't accessible for me after I followed the start-up guide. I tried it once with mostly automatic and once with mostly manual setup. Each time I got an unstyled login page and a nice 404 instead of app.css
. Once I ran yarn build
and restarted the server - it was 👌.
Could it be that the server doesn't serve static assets from directories that weren't present on start-up? It finishes spinning up while frontend stuff is still building, creates an index of static assets before they're all there and then ignores requests for them? If that's the case, it would have been enough for me to simply restart the server 🤔. I'll check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bitbldr
Alright, so reloading the page does nothing, but restarting the server helps (which lends some credibility to my theory about static assets). I think I prefer running yarn build
to telling people to "run mix phx.server
, kill it and then run mix phx.server
again" ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guides/starting/developer.md
Outdated
@@ -106,6 +107,10 @@ with the Torus server running directly on the host machine. | |||
|
|||
> In order to sign in, you must use **https** and accept the self-signed cert browser warning to avoid CSRF issues. If you would like to provide your own cert instead of accepting the included one, simply replace `priv/ssl/localhost.crt` -or- use the localhost tunneling method below to generate a public URL with SSL enabled. | |||
|
|||
> To access email verification message and activate your locally-created account, visit `http://localhost/dev/sent_emails`. | |||
|
|||
> Default administrator credentials are defined in `oli.env` as `ADMIN_EMAIL` and `ADMIN_PASSWORD`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: These values will only be used to initially seed the database (during mix ecto.setup/ecto.reset) and will not change after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I assumed but yeah - it does need clarifying. Changed. Thank you.
54b4099
to
1f21494
Compare
This PR introduces a couple of minor improvements to the initial dev set-up. The only real issue was the missing FE build step - all the rest are nitpicks.
Changes:
&& yarn deploy
todevmode.sh
developer.md
("Mostly Manual Steps")DB_HOST
value inoli.env
as the value doesn't currently need replacing/dev/sent_emails
and default admin credentials to "Notes"devmode.sh
, replaced process substitution with a temp file approach - I don't think process substitution is supported by the antediluvian Bash version that comes with MacOS... or maybe it's something to do withsource
- I'm not sure; it throws a syntax error for me, anyway (Bash 3.2.57)Alternate designs: