eclipse-pass / pass-ui

UI code base for PASS
Apache License 2.0
4 stars 16 forks source link

Initial dev docker setup #1156

Closed jabrah closed 1 year ago

jabrah commented 2 years ago

Could use feedback on its usefulness on Mac.

Testing

I pushed the dev image to GHCR, so it should be pulled down and be useful without the full rebuild.

As long as you have pass-docker in place as described below, you should be able to run:

yarn run dev

This will spin up the demo environment with a new dev-friendly image for the UI which will run live code from pass-ui. Changes will automatically be re-built and available after manually refreshing the page in your browser.

Issues

At the moment, this requires a specific directory structure. pass-docker and pass-ui need to be next to each other:

|- pass-docker/
\- pass-ui/

This is needed because of the way two aspects are handled in this iteration. The convenience script brings the demo's compose file in as the base file, which defines the base path when defining the location of the bind mounts. The issue is that we want to use the demo environment as a base and bring the new compose file to override some pass-ui settings so that we can insert our new image in place of the original pass-ui image in order to get the networking to function.

I'm not sure if there's a simple way to use dynamic values (like env vars) in the compose file to define bind mounts

jabrah commented 2 years ago

The build.sh script is unrelated to this development setup, but the error you include here is likely because of the version of Node you're using. I also see this error when using Node v16+, so we have to stick to Node v14 until we can update ember-cli to a version that includes this fix

Thanks for pointing out that yarn run build:dev doesn't work, turns out I had just forgotten to push the one commit that adds that command

jabrah commented 2 years ago

Do we think it would be better to have the UI dev environment managed here in pass-ui, or would it be better to move it into pass-docker? I don't think this would require many changes, mostly just the dev compose file would just point to where you have pass-ui locally on your file system in order to mount it to the dev container

jaredgalanis commented 2 years ago

Do we think it would be better to have the UI dev environment managed here in pass-ui, or would it be better to move it into pass-docker? I don't think this would require many changes, mostly just the dev compose file would just point to where you have pass-ui locally on your file system in order to mount it to the dev container

Personally, it seems reasonable to have this dev env live here in pass-ui. pass-docker, unless we change something, is less of a dev env and more of a portable running instance of the stack.

jabrah commented 2 years ago

Note that this setup must change slightly when/if https://github.com/eclipse-pass/pass-docker/pull/289 is merged

jaredgalanis commented 1 year ago

Discussed and we are opting to develop pass-ui using MIRAGE='true' ember s instead