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

Using kamal-proxy for accessories #1122

Closed
tommica opened this issue Oct 16, 2024 · 7 comments
Closed

Using kamal-proxy for accessories #1122

tommica opened this issue Oct 16, 2024 · 7 comments

Comments

@tommica
Copy link

tommica commented Oct 16, 2024

Is it possible to do some kind of a reverse proxy configuration to accessories? I'd like to have multiple applications on one server, and for each of them to have their own mailpit instance, accessed by it's own sub-domain - so something like this:

APP1: foo.bar.baz.test
MAIL: mail.foo.bar.baz.test (80 -> 8025)

APP2: john.bar.baz.test
MAIL: mail.john.bar.baz.test (80 -> 8025)

@luizkowalski
Copy link

#981

@igor-alexandrov
Copy link
Contributor

@djmb this issue can be closed, since #981 has been merged.

@djmb djmb closed this as completed Nov 26, 2024
@shiny
Copy link

shiny commented Dec 7, 2024

@djmb this issue can be closed, since #981 has been merged.

Some services require authentication or may return non-200 HTTP status codes. The proxy health check setting should accept a non-200 status codes, or offer more authentication settings.

@igor-alexandrov
Copy link
Contributor

@shiny can you provide an example of such containers? My implementation of proxy for accessories has been based on PgHero service, which exposes a health check route without an authentication.

@shiny
Copy link

shiny commented Dec 7, 2024

@shiny can you provide an example of such containers? My implementation of proxy for accessories has been based on PgHero service, which exposes a health check route without an authentication.

I am using the Docker image appwrite/resque-web, here is my deploy file

  resque-web:
    image: appwrite/resque-web:1.1.0
    proxy:
      ssl: true
      host: <host>
      app_port: 5678
      healthcheck:
        path: /
    env:
      clear:
        RESQUE_WEB_HOST: <redis-host>
        RESQUE_WEB_PORT: 6379
        RESQUE_WEB_HTTP_BASIC_AUTH_USER: admin
        RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD: <password>

Related Repo

PS
This feature has been a great help to me, thank you so much!

@igor-alexandrov
Copy link
Contributor

This makes sense... As a workaround you can fork appwrite/resque-web and create a small Rack app in config.ru that won't be password protected to serve a health check route.

@djmb what do you think about the ability of adding --health-check-username and --health-check-password flags to the kamal-proxy deploy command?

@shiny
Copy link

shiny commented Dec 8, 2024

Another situation, I'm struggling with containers that have two ports, as they are difficult to proxy.
My case is minio/minio

This is because it uses both port 9000 and 9001 — 9000 for the API and 9001 for the console.
I'm aimming to bind s3.example.com to port 9000 and console.s3.example.com to 9001. However, it seems that is not possible.

I have to directly publish the HTTP ports instead.
Another approach is separate the minio server and it's console, but this is a little bit tricky. MinIO has even removed the minio/console image.

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

No branches or pull requests

5 participants