libreosteo / LibreOsteo

Open Source software for osteopathes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing mailcap apk packet in last docker libreosteo/libreosteo-http image

lthreva opened this issue · comments

Hello,

I've tried to use the last libreosteo/libreosteo-http image.
My setup is:

traefik proxy
libreosteo (docker container)
docker swarm (one host)

I've used an old database to test the migration before going into production.

The login page displayed no style at all.

On browser side, I can see the following error:

La feuille de style https://xxxxxx/static/CACHE/css/output.b13e1948f9f9.css n’a pas été chargée car son type MIME, « text/plain », n’est pas « text/css ».

which could be translated to
The stylesheet https://xxxxxx/static/CACHE/css/output.b13e1948f9f9.cs was not loaded because its MIME type, “text/plain”, is not “text/css”.

After some digging (cf unbit/uwsgi#821), I've installed the following package:
apk add mailcap

It solved my problem.

Before doing a PR for the Dockerfile I would like to know if someone raised the issue (I've found nothing in the tracker) and if it's related to my setup.

How to reproduce:

  • traefik + libreosteo-http:latest + docker swarm mode
  • go to page, login page has no style
  • Go into container and run apk add mailcap
  • restart container
  • got to page, login page now has style

Regards,

Hello,
Thank you for reporting this issue.
image libreosteo/libreosteo-http has to be used alone, and in this case, statics are well served.
Probably in your case, maybe the serving application has to be mounted with : traefik + nginx (with static file serving) + libreosteo-sock (see https://github.com/libreosteo/LibreOsteo/blob/master/Docker/build/sock-ready/Dockerfile )
Statics are built and propose into a volume that you can mount on nginx (see /var/application/static), and use uwsgi_pass to point on the port of the container for the image libreosteo-sock :

location / {
            uwsgi_pass  libreosteo-sock:3031;
            include uwsgi_params;
            uwsgi_read_timeout 3000;
            proxy_pass_header Set-Cookie;
      }

then traefik for load balancing+ssl on this serving.

It is more performant to use nginx for serving static files instead of using process from uwsgi. Keep only the python stuff for uwsgi.

Could you try in this situation please ?

Hello,
Thanks for the quick answer.

Indeed, I have to try the proposed setup. As A probably need some time to test it and that there is no defect in Libreosteo, I would suggest to close this issue.

I'll post an update with the complete setup.

Regards

Ok sure !
Thanks to you and do not hesitate to request support on it.