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

Ddev local setup integration for BE and FE site. #434

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sonvir249
Copy link

@sonvir249 sonvir249 commented Mar 31, 2024

Things covered

  1. Integrated ddev for local setup.
  2. Fixed trim() deprecation warning.
  3. Added a custom ddev command ddev setup to setup project locally.

@sonvir249 sonvir249 changed the title Ddev local setup integration for BE and FE sitwe. Ddev local setup integration for BE and FE site. Apr 1, 2024
Comment on lines +8 to +11
if ! command -v composer >/dev/null; then
echo "composer is not available. You may need to install 'composer'"
exit 1
fi
Copy link
Owner

Choose a reason for hiding this comment

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

This isn't true

@@ -0,0 +1,20 @@
#!/bin/bash

#ddev-generated
Copy link
Owner

Choose a reason for hiding this comment

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

Remove this line

Comment on lines +20 to +22
hooks:
post-start:
- exec: yarn install
Copy link
Owner

Choose a reason for hiding this comment

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

We should move this to setup, or also have composer install here I suppose

Comment on lines +23 to +26
web_extra_daemons:
- name: http
command: "yarn frontend-start"
directory: /var/www/html
Copy link
Owner

Choose a reason for hiding this comment

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

I'd had issues with this, where it runs before dependencies have installed. I'm pretty sure this starts up before post-start hook executes.

Comment on lines +19 to +27
1. Configure frontend app.
- Create `.env.local` in frontend directory
- Add following environment variables

```
REACT_APP_API_BASE_URL=https://contribkanban.com.ddev.site
PORT=4000
```

Copy link
Owner

Choose a reason for hiding this comment

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

We can add REACT_APP_API_BASE_URL to the DDEV config yaml web environment variables

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