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

How to run docker compose on localhost? #234

Open
pancake-boy opened this issue Apr 15, 2024 · 9 comments
Open

How to run docker compose on localhost? #234

pancake-boy opened this issue Apr 15, 2024 · 9 comments

Comments

@pancake-boy
Copy link

Things I have tried

  1. In .env, NOTIFO_DOMAIN=localhost
  2. docker compose up
  3. Chrome > visit https://localhost
  4. error in docker console

notifo_proxy-1 | 2024/04/15 07:48:46 http: TLS handshake error from 172.18.0.1:38592: remote error: tls: unknown certificate

image001

@SebastianStehle
Copy link
Collaborator

Good question.

The problem is that notifo needs https for authentication. I do not have a setup that just works, because afaik you cannot create a trusted localhost certificate using lets encrypt.

@pancake-boy
Copy link
Author

I tried to trust the root cert as documented here: https://caddyserver.com/docs/running#docker-compose
But still not working

@SebastianStehle
Copy link
Collaborator

Here they use the internal flag, but I am not sure how to apply if dynamically:

https://stackoverflow.com/a/69648452/1229622

@pancake-boy
Copy link
Author

Where do I add this “tls internal“ just to try it out?

@SebastianStehle
Copy link
Collaborator

The caddy proxy is defined here:
https://github.com/Squidex/squidex-hosting/tree/master/docker-compose/proxy-caddy

You have to add the "tls internal" to the Caddyfile.

@SebastianStehle
Copy link
Collaborator

I have tested it and added a readme with some instructions: https://github.com/notifo-io/notifo/tree/main/deployment/docker-compose

@pancake-boy
Copy link
Author

pancake-boy commented Apr 16, 2024

So you have added SITE_SETTINGS (actually SITE_CUSTOM) to your caddyfile and published caddy-proxy v2.7.6

I have tried the new docker-compose file but still giving me the same error. Strange

@pancake-boy
Copy link
Author

At the moment, I resorted to exposing the port for notifo_notifo and use http.
It seems to work but not sure what issues I will run into later without https

@SebastianStehle
Copy link
Collaborator

Have you read the readme?

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

2 participants