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

FQDN is a URL and not a fully-qualified domain name #1248

Open
almereyda opened this issue Feb 22, 2025 · 1 comment
Open

FQDN is a URL and not a fully-qualified domain name #1248

almereyda opened this issue Feb 22, 2025 · 1 comment
Assignees

Comments

@almereyda
Copy link

Because I had previously introduced an FQDN variable for configuring a Traefik router, this broke after the recent introduction of this variable here in my upstream.

The variable is actually a full URL that also includes the scheme, why parsing the string as an FQDN fails. This semantic ambiguity can be resolved with introducing another variable APPFLOWY_PUBLIC_URL or similar.

< FQDN=http://localhost
---
> FQDN=appflowy.example.org
> APPFLOWY_PUBLIC_URL=https://${FQDN}
< API_EXTERNAL_URL=${FQDN}/gotrue
---
> API_EXTERNAL_URL=${APPFLOWY_PUBLIC_URL}/gotrue
< # APPFLOWY_S3_PRESIGNED_URL_ENDPOINT=${FQDN}/minio-api
---
> # APPFLOWY_S3_PRESIGNED_URL_ENDPOINT=${APPFLOWY_S3_MINIO_URL}
< APPFLOWY_WEB_URL=${FQDN}
---
> APPFLOWY_WEB_URL=${APPFLOWY_PUBLIC_URL}

This setup is very specific to not running with Minio #1247 and trimming down nginx.conf #1246

These adaptations allow to run the nginx container with an FQDN as Traefik host rule:

    labels:
      traefik.enable: true
      traefik.http.routers.org-example-appflowy-web.entrypoints: web
      traefik.http.routers.org-example-appflowy-web.rule: Host(`${FQDN}`)
      traefik.http.routers.org-example-appflowy-web.middlewares: http-to-https
      traefik.http.middlewares.http-to-https.redirectscheme.scheme: https
      traefik.http.middlewares.http-to-https.redirectscheme.permanent: true
      traefik.http.routers.org-example-appflowy-webs.entrypoints: webs
      traefik.http.routers.org-example-appflowy-webs.rule: Host(`${FQDN}`)
      traefik.http.routers.org-example-appflowy-webs.tls: true
      traefik.http.routers.org-example-appflowy-webs.tls.certresolver: le
@khorshuheng
Copy link
Collaborator

You are right - for some reason i have always thought that FQDN includes the scheme as well, and i have just check again and confirm that it is not the case.

I will fix this and add this information to the upgrade note.

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