caddy-gitea
caddy-gitea copied to clipboard
Assets files are not served
I am using traefik for gitea container to have proper https. Since i do not have exposed it to the internet i used DuckDNS dns challenge to have https configured. This works for gitea and for all the other containers i have.
I have gitea and CI which builds repo gitea-pages using mkdocs for website it has gitea-pages branch and also topic with this name as it was described in this projects guide.
I configured domain for this service as usual in labels of docker-compose file for it for traefik first org is my organization name
- traefik.enable=true
- traefik.http.routers.caddygitea.rule=Host(\org.mydomain.duckdns.org`)`
- traefik.http.routers.caddygitea.entrypoints=websecure
- traefik.http.services.caddygitea.loadbalancer.server.port=3000
And Caddyfile for caddy-gitea is this:
{
order gitea before file_server
}
:3000 {
gitea {
server http://gitea:3000
token 3944d6d1833d56b9e55af6055f5424c7133418ef
#domain mydomain.duckdns.org # Uncomment and configure if needed
}
}
It serves index.html for / but assets are not served properly. If i click on link in documentation subpath index.htmls are not even served. It shows just a white page. Here is an error from inspect element of browser when i open / and assets are not served.
GET https://org.mydomain.duckdns.org/assets/stylesheets/main.50c56a3b.min.css
GET https://org.mydomain.duckdns.org/assets/stylesheets/palette.06af60db.min.css
GET https://org.mydomain.duckdns.org/assets/javascripts/bundle.c18c5fb9.min.js
Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content.
Empty string passed to getElementById().
GET https://org.mydomain.duckdns.org/assets/javascripts/bundle.c18c5fb9.min.js
Loading failed for the <script> with source “https://org.mydomain.duckdns.org/assets/javascripts/bundle.c18c5fb9.min.js”.
GET https://org.mydomain.duckdns.org/assets/images/favicon.png
How can i fix it?