Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Front office JS & CSS dependencies broken #13

Open
erixtekila opened this issue Mar 27, 2019 · 4 comments
Open

Front office JS & CSS dependencies broken #13

erixtekila opened this issue Mar 27, 2019 · 4 comments

Comments

@erixtekila
Copy link

erixtekila commented Mar 27, 2019

Hi,

This is the log of the browser :

Refused to apply style from 'http://portal/stylesheets/application/application.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
application.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/favicon.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
portal/:1 Refused to apply style from 'http://portal/stylesheets/application/application.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

With the same version, not containerized, everything is working.
I don't get a clue.

@starlightcrafted
Copy link
Owner

Hi,

I seem to have trouble producing the error, can you provide the steps that you used to launch the container?

Thanks!

@erixtekila
Copy link
Author

erixtekila commented Apr 18, 2019

Hi,

I did the normal steps :

  • Configure an ubuntu 16 + docker hosting
  • Use docker compose to launch the container
  • followed your README

@starlightcrafted
Copy link
Owner

Can you post the output of

cd ubuntu
docker-compose run postal initialize
docker-compose run postal make-user
docker-compose up -d

on a new clone of the repository

While the CSS/JS is generated via the postal initialize step, I want to compare the output of an installation which has issues generating the CSS/JS to one that doesnt.

Thanks!

@theFra985
Copy link

Hi
I had the same problem but I solved it just adding

    location /stylesheets {
        add_header Cache-Control "public,max-age=3600,immutable";
    }
    location /javascripts {
        add_header Cache-Control "public,max-age=3600,immutable";
    }

in the nginx.conf alongside the /assets location

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants