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
Abhi/compose cli #217
Abhi/compose cli #217
Conversation
Do we need getopts for this? If there are only four options, can't we just do string comparisons? I'd rather support only long options than only short options, especially since these are all pretty short. |
well I also wanted to add a flag for compose up vs down, and I think it makes the script more readable, but I suppose it makes the command less readable, so ye I'll just match on the longopts (does remove the option to do -xl tho, which is nice and short) |
One thing I'm a bit worried about here is that we break
In particular, it's important to me that the getting started guide not introduce any additional complexity with the CLI, which is why I like keeping a default compose file with the guac mix-in around. Then we can have another section on local development that talks about x11. |
Ah, I was writing my comment before I saw yours, but we have similar concerns. Lmk what you think of having the script just be for creating the compose file, and then continuing to use I guess one concern here is that there may be commands we want to run to set up the x11 server on mac that have to be run for each invocation after a restart? |
I think I know how to deal with that, looking at xquartz docs, but I'll have to make sure. |
hm yea i think that works perfect, I'll have the firefox service be defaulted to guac in the compose file, and -f firefox-x11.yml to override it in the x11 cases. this keeps |
In that case, if this is to be slightly off the beaten track, can we keep the current getopts handling of cli args? I'll make the EDIT: nevermind this, I just remembered an old trick that'll come in handy. |
2f8f466
to
7ae26c7
Compare
Your Render PR Server URL is https://plane-pr-217.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cd9ikp2rrk0ep799fft0. |
ahh I think this is ready to be merged, just needs some testing on macos first. (I'll add in additional docs in a future pr, the current workflow is unaffected aside from CD'ing to a different dir, which I changed in the docs) could one of you try it on mac and make sure I didn't break anything? try |
When I run that, I get:
Once it starts, I get this:
|
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 like this as long as we can make it 100% seamless on Mac. I do worry about the support burden though, there's a lot of moving parts and unknowns.
Ah can you try running it after a I also totally forgot the freedesktop stuff wasn't POSIX. Will fix. |
448ee98
to
f62b2b9
Compare
I'll add in the x11 support for mac once I have the aws VM set up, I think this should be good to merge for now though. |
This still has the issue we discussed where it wants to build the drone locally when I don't have the image already, and we don't have a workaround for that without causing the other images not to build. I'm inclined to just go back to commenting out the build section of the yaml, I think. |
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.
One small doc change but otherwise looks good!
docs/docs/getting-started.md
Outdated
@@ -37,7 +37,7 @@ Use docker-compose to start a local instance of Plane: | |||
|
|||
```bash | |||
cd plane/sample-config/compose | |||
docker compose up | |||
docker compose pull && docker compose up |
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.
nit: let's just do these on separate lines, i.e.
cd plane/sample-config/compose
docker compose pull
docker compose up
That way it's easier to debug because the output is directly associated with the command that caused it.
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.
Oops, thought I LGMT'd this on the last comment. Thanks for the change, merging now!
This adds the cli proposed in #199
I'm still working on this (need to add in certs and make the guac-firefox default open up to plane.dev)
but I wanted some comments on the cli, the way it works is:
./plane-dev -[lmxg]
where-l : linux
-m : mac
-x : x11
-g : guac
I'd have nice long options, but can't do that without GNU getopts, which isn't on macs by default, so I'd rather not.
what'd you guys think?