Closed acondura closed 4 years ago
I've just finished creating an addon named 'coder' which uses a fork of https://github.com/cdr/code-server
@acondura that sounds great! We actually have a PR open to replace Cloud9 integration in docksal/cli
with VS Code. If we can make it work as an addon instead, that would be even better.
Regarding HTTPS enforcement. Docksal does not currently provide any built-in means for that, leaving it to the application or web server configuration. As coder runs its own server, you can check if it can do the redirect and enforce HTTPS.
If that does not work out, then HTTPS enforcement will need to be handled at the vhost-proxy level. You can submit a feature request in https://github.com/docksal/service-vhost-proxy.
Yes, I know about the PR, I keep looking through the Docksal issue queue from time to time to see what "goodies" might come up in future versions :) and before I saw that PR I was actually looking into implementing https://icecoder.net as an addon. Funny thing is I was already using VSCode on my mac and I was thinking "wouldn't it be cool if VSCode was up on a server".
I already have the addon working on two of my clients for developers to work with and I'm sorting out a few more details this week and maybe next week I can publish it as a Docksal addon.
Also, another issue that I saw the need for before I even saw your PR was "Automatic Drupal settings configuration" https://github.com/docksal/docksal/issues/1030. I've recently started working it since it's a crucial thing with Drupal clients and I'll share more info soon.
The other thing that needs to change with Docksal addons is that these run as subdomains instead of e.g. pma-project.docksal, which is not efficient when it comes to SSL LE wildcard certs. Since the limit of certificates per registered domain is 50 per week, this can be easily reached with a team of developers working on a server. I'd be interested in helping here too.
Yep, agree on the subdomain issue and certs. It's easily solvable by using a flat domain schema and replacing dots with hyphens or double-hyphens (e.g., pma--project.docksal
).
Coder is an executable running in a container, I'm using this approach https://github.com/cdr/code-server/blob/master/doc/admin/install/digitalocean.md.
The thing is I'm able to load the coder UI both by http://ide-subdomain.tld.com and by https://ide-subdomain.tld.com, they both work great. I'm just having trouble redirecting http to https.
I've tried every combination I could think of from https://docs.docksal.io/service/web/settings and it just does not react, no redirection from http to HTTPS.
I've tried every combination I could think of from https://docs.docksal.io/service/web/settings and it just does not react, no redirection from http to HTTPS.
Those docs are for the web
container. Changing the web server configuration will have no effect here, since you have coder running in a separate container.
The routing is handled by the system-wide docksal-vhost-proxy
service, which currently does not support HTTPS enforcement flag and redirect. You can submit a feature request in https://github.com/docksal/service-vhost-proxy.
Got it, thank you Leonid.
I'm almost ready to publish the 'coder' addon which uses a custom Dockerfile and I'm going through https://docs.docksal.io/stack/extend-images/#maintain-image. Let me know if I'm missing anything in the process of publishing the 'coder' addon.
Oh right, almost forgot. I created https://github.com/docksal/service-vhost-proxy/issues/50 as you said.
I'm trying to create a pull request for the Coder addon but when I click the 'New pull request' button over at https://github.com/docksal/addons/pulls the 'Create pull request' button on the next page is disabled. My user is https://github.com/acondura, do I need some permissions for this?
To submit a PR, you need to fork this repo and create a branch. You will then be able to create a PR from your fork.
Great, thank you @shelane. I've added a pull request for 'Coder addon' at https://github.com/docksal/addons/pull/47.
Closing. See discussion in https://github.com/docksal/addons/pull/47. Coder is now pre-installaed in docksal/cli.
I've just finished creating an addon named 'coder' which uses a fork of https://github.com/cdr/code-server and because I'm using a wildcard SSL from LetsEncrypt on a Ubuntu server, I use URLs like ide-project1.domain.com, ide-project2.domain.com, etc.
After going through the Docksal docs for a few days now, I ran out of options to test and make http://ide-project1.domain.com go to HTTPS://ide-project1.domain.com. I looked at https://docs.docksal.io/service/web/settings/ and applied those settings but it just would not work.
HTTPS://ide-project1.domain.com does work but it does not force http to https. Any idea why?
fin config: