Skip to content
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

Updated and simplified ddev config.yml #170

Merged
merged 5 commits into from
Mar 15, 2024

Conversation

bmartinez287
Copy link
Collaborator

The Issue

DDEV setup commands where to complex

How This PR Solves The Issue

Simplifies the workflow and provides a better experience out of the box.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! When you like it I like it.

directory: /var/www/html
hooks:
post-start:
- exec-host: echo -e " NOTICE \n
- exec: bash -c 'while [ ! -f /var/tmp/npminstalldone ]; do sleep 1; done'
- exec: npm run build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't this in the daemon startup instead of here? Another && ?

Copy link
Collaborator Author

@bmartinez287 bmartinez287 Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great question, I was going to add it there but npm run build takes 30seconds.
Screenshot 2024-03-14 at 2 24 05 PM
It made me wonder if it broke, it's too long of a wait with no feedback.
Additionally, we only need it the first time since most times we likely be running HMR(hot module reloading anyway, so I added logic for that.

How do I turn the echo -e green? I wanted ${DDEV_PRIMARY_URL}:4321 to be green, but i can't find the variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

@bmartinez287 bmartinez287 Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo -e "\e[1;31mHello \e[1;35mWorld"
that works locally, but once it goes through ddev exec it fails.
ddev exec echo -e '\e[1;31mHello \e[1;35mWorld'
e[1
bash: line 1: 31mHello: command not found
Failed to execute command echo -e \e[1;31mHello \e[1;35mWorld: exit status 127

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try it in single quotes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-03-14 at 4 13 19 PM Got it. I must have been having a typo there.

Copy link

cloudflare-workers-and-pages bot commented Mar 14, 2024

Deploying ddev-com-front-end with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0495706
Status: ✅  Deploy successful!
Preview URL: https://49f500f3.ddev-com-front-end.pages.dev
Branch Preview URL: https://20240314-bmartinez-updated-d.ddev-com-front-end.pages.dev

View logs

@bmartinez287 bmartinez287 requested a review from rfay March 14, 2024 20:14
@bmartinez287
Copy link
Collaborator Author

It should be good to go now.

@rfay
Copy link
Member

rfay commented Mar 15, 2024

You have some rebasing that needs to be done.

@bmartinez287 bmartinez287 force-pushed the 20240314_bmartinez_updated_ddev_config branch from 8304e3e to 15bc6f9 Compare March 15, 2024 18:24
@bmartinez287
Copy link
Collaborator Author

config has been rebased.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rfay rfay merged commit e816139 into main Mar 15, 2024
2 checks passed
@rfay rfay deleted the 20240314_bmartinez_updated_ddev_config branch March 15, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants