JustinBack
(Justin René Back)
10 Diciembre, 2022 08:49
1
Después de hacer una actualización hoy y habilitar la opción S3_CDN_URL en los env, todo excepto markdown-it-bundle se carga.
https://tosdr.community/https://tosdr-community.s3.jrbit.de/assets/markdown-it-bundle-5a633717415fd164893a925e4cac1406ecab8179d15637506b08a147ab543433.br.js
Si bien los activos en el servidor existen y se han subido, Discourse todavía antepone la URL base.
Todos los demás activos funcionan bien.
He revisado la tabla de subidas y todas las URL tienen el formato adecuado.
¿Hay alguna otra tabla en la que pueda buscar o una solución simple para este problema?
¿Existe algún DbHelper como remap pero para buscar una cadena en toda la base de datos?
1 me gusta
¿Seguiste una guía para configurar Discourse con S3? Parece que hay muchas correas sofisticadas que debes seguir para configurarlo, según este tema:
This topic covers how to configure some common S3 compatible Object Storage providers (S3 clones). See Set up file and image uploads to S3 for more details about Amazon AWS S3 configuration, which is officially supported and used internally by Discourse for our hosting services.
Provider
Service Name
Works with Discourse?
Amazon AWS
S3
Yes
Digital Ocean
Spaces
Yes
Linode
Object Storage
Yes
Google Cloud
Storage
Yes
Scaleway
Object Storage
Yes
Vultr
Obj…
1 me gusta
Me temo que esto no es lo mío, pero encontré este tema con un problema similar, ¿podría ser de ayuda?
When configuring Object Store, preview for topics/posts are not working.
Discourse is configured with an Object Store
Install is on docker, following the doc.
Discourse version: 2.8.0.beta11
Here are my env variables for S3 configs:
DISCOURSE_CDN_URL: https://discourse.liiib.re
DISCOURSE_USE_S3: true
DISCOURSE_S3_REGION: default
DISCOURSE_S3_ENDPOINT: https://hot-objects.liiib.re
DISCOURSE_S3_ACCESS_KEY_ID: ACCESS_KEY_ID
DISCOURSE_S3_SECRET_ACCESS_KEY: SUPER_SECRET_KEY
DISCOU…
2 Me gusta
JustinBack
(Justin René Back)
12 Diciembre, 2022 23:02
8
@crcoli7307 Sí, ese fue exactamente el tema que seguí
@JammyDodger
¡Gracias por el tema!
Así que cambié el S3_CDN_URL a:
DISCOURSE_S3_CDN_URL: https://s3.jrbit.de/tosdr-community
Pero, lamentablemente, esto rompió todo, en términos de dónde se carga la hoja de estilo.
¿Podría ser el nombre del bucket, ya que es casi igual al dominio?
Nombre del bucket: tosdr-community
Dominio: tosdr.community
Mira cómo se construyen las hojas de estilo.
JustinBack
(Justin René Back)
13 Diciembre, 2022 00:39
9
Acabo de migrar a un nuevo bucket: No es el nombre del bucket, el mismo problema está ocurriendo.
JustinBack
(Justin René Back)
13 Diciembre, 2022 20:34
10
ACTUALIZACIÓN: Acabo de comprobar la forma en que se incrusta markdown-it-bundle y ejecuté el script_asset_path a través de la consola de Rails (¡con ligeras modificaciones debido a la falta de la variable request.env!)
Según el script_asset_path, la URL del activo se genera correctamente. Todavía no estoy seguro de por qué está sucediendo esto.
EDITAR:
Parece ser un error conocido
I’m also in this situation with an object store configured (minio) but no CDN. Is it a use case that could be supported ?
From what I’m seeing so far in my tests there is only the markdown-it-bundle js file that is having issues as its pointing to the wrong URL - DISCOURSE_HOSTNAME/DISCOURSE_S3_CDN_URL/assets/markdown-it-bundle-HASH.br.js
It actually looks lit a bug for this one, if I set DISCOURSE_CDN_URL variable, it still points to the wrong URL in this form DISCOURSE_HOSTNAME/DISCOURSE_CD…
EDITAR 2:
Lo “solucioné” usando la solución más sucia disponible. Codificando el activo en la configuración de nginx y redirigiéndolo
location ~ markdown-it-bundle-dcd9743077867b3a68d7b723130cb2711dc4c843b018d7bc609f868289402fef.(.*).js {
return 302 https://tosdr-forum.s3.jrbit.de/assets/markdown-it-bundle-dcd9743077867b3a68d7b723130cb2711dc4c843b018d7bc609f868289402fef.$1.js;
}
Hizo el truco, a menos que el activo se actualice
1 me gusta