WIP: Include front end in ddev configuration #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A few of us are having some issues setting up locals, and this PR is an aim to get everything under one roof by using ddev to launch the front end.
TODO / SUPPORT NEEDED
Goals:
npm run
on DDEV's host system, which necessitates having node/npm on the host system, and introduces the possibility of running the front end with a different version or configuration than that of the app itself.ddev start
and get a configured, working site.performance.ddev.site
domain and runs each service, with SSL, on a different port. Removing the complexity of communicating between http://localhost:3000 and https://performance.ddev.site/ will probably help with CORS, etc.Testing:
Back up env files:
Stop running the front end site ( so that it's not listening on localhost:3000 )
Run
ddev restart
if you have custom stuff in your .env files
ddev restart
you just ran, copies the sample env file to .ddev/.env , but won't preserve the things you had in the files you just backed up! (e.g. AIRTABLE KEY, etc.)ddev restart
to apply the changes.You should be able to see a 'Next.js front end' service running when you run
ddev describe
You should be able to access the front end site at https://performance.ddev.site:3000