Docker reload does not reflect changes in CSS files - docker

I've configured docker to reload automatically when i make changes to my project files. It works fine when i make changes in HTML or .py files but does not reflect any changes to CSS files. this question has also been asked here but there is no answer yet. Please help!
I'm using Flask python with gunicorn. Exactly following this course on udemy.

Figured that this error is unpredictable. Its a problem with virtualbox used by Docker. The simplest workaround i found was to run another parallel application which apparently resets virtualbox. Clearing browser cache after doing that solved the problem for me.
While this is just a workaround, if anyone has a clear solution, please share it here.

I had the same problem and solved it using this suggestion by #famelis:
The problem, IMHO, is with the browser. It is using the cache for css and js.
If you are in development environment you can use google chrome and open the programmer's tools (Ctrl+Shift+I)
Then in the Network tab the "Disable cache" must be checked, and this solves the problem.
In production you need to have different paths/names for the files, possibly with version number, for the browser to re-read the files and not use the cache.

Related

CSS not rendering at puppeteer inside docker

I have automated browser tests using puppeteer. I ran them at Circle CI using default Circle CI windows machine. Now I'm trying to change to a docker which is based on a Microsoft Debian machine (the website is .NET). I installed chromium at this machine. The problem is the CSS is not rendered. I used page.on request/response and the css is requested, response is 200. I looked for a configuration that could be disabled, but I didn't find it - neither at StackOverflow.
Repository: https://github.com/darakeon/dfm/
Branch right now: 4.1.5.0 (it will be promoted to master when I finish the version)
The dockerfile is inside docker folder. It is at Docker Hub too, my user is darakeon. Right now the name is darakeon/net-circleci. When I solve the problem, I will rename this, to split into 2 different machines - one based on microsoft which has only libman, another based on the first, that can run puppeteer too.
Tests folder: site/Tests/Browser
Script I'm using to run tests: .circleci/browser/run-tests.sh
The most time you spent trying to solve something, the more ridiculous will be the solution. Please, call me idiot, but help me to solve this...
Discovered the problem. Here is how:
I used page.screenshot at another site on the web to check if the css was rendering at it. It was. Weird. After looking for solutions, I was always finding people teaching how to NOT show the css, intercepting the request and stopping it. So I intercepted the requests to see if the css was being requested:
await page.setRequestInterception(true);
page.on('request', (req) => {
console.log(req.url(), req.resourceType())
req.continue();
})
Given the requests were ok, I went to check the responses:
page.on('response', (r) => {
if (r.status() >= 400)
console.error(r.url(), r.status())
})
Surprise! My main css was returning 404. But why, if it worked at windows? Simple. Windows doesn't care if you call Bootstrap, bootstrap, bOOTSTRAP or BoOtStRap, them all will search the same file. Linux consider as right just the exactly same case.
So, when you get your .NET site from windows and put it at Linux, check the cases of everything.

Gitlab Pages delivers random content

I am experiencing weird behavior with the Pages feature of GitLab Omnibus package running on an Ubuntu 16.04 virtual machine. Some projects use Pages with Jekyll built by GitLab CI, which has been working as expected since it was first published with Gitlab CE.
For a couple of days now, visiting any of the homepages of those sites shows the content of just one of the projects. Each of them should of course show different content, but they all show the same. Even stranger: the content shown on each of the sites changes over time to one of the other projects, and I can not see whether this is deterministic.
Restarting the build processes of each of the projects did not fix this, neither did gitlab-ctl reconfigure, stop and start, nor rebooting the entire VM.
To investigate on that issue, I edited (which I assume is) the resulting file of the build process at /var/opt/gitlab/gitlab-rails/shared/pages/www/www.domain.org/public/index.html. Not in the first place, but later on during the already stated "rotating" content, the edits showed up on the webpage.
So what is going on there? Is this some caching issue? Is it malconfiguration? Is it a bug? Please help me find and fix the problem, as those are production websites.
Looks like this is actually an issue

JBoss newbie can't load app to custom port

Thanks in advance for your patience. I'm a recent "convert" to JBoss, having the maintenance of an application thrust upon me, and so long as we don't touch it, it works just fine. However, the mandate has come down to port the app from Solaris to Linux Fedora, using version 4.2.3GA.
I am using the jboss-port-bindings.xml to specify the ports I want to use, but when I bring JBoss up it loads to standard port 8080 rather than 40029 like I specify in the file. I have triple-checked the configuration and it's set up on the Linux box exactly the way it's set up on the Solaris box - all the required files are where they are supposed to be, etc.
Anybody have an idea as to why I can't use the specified ports? If you need more information than what I have supplied, please just ask.
We found the problem. The jboss-service.xml file we had in the server/default/conf folder was correct, but we also needed to add the same file to the server/appname/config file, where appname is the name of our application. This told the app where to go looking for the jboss-port-bindings.xml file and now everybody's happy.
Don't know why we didn't have to have that configuration under Solaris, but anyway, this solved the problem. Thanks to those who had a look at the question. Chalk this one up to experience.

Firefox add-on doesn't work with tag <em:updateURL>

I have a custom Firefox add-on. It worked ok, until we decided to make it self update-able.
According to manuals at mozilla.org, there should be an <em:updateURL> entry in add-on's install.rdf, containing a link to some update.rdf. Seems pretty simple.
But, when I add <em:updateURL>some_url</em:updateURL>, the add-on doesn't work. I use Netbeans IDE with Foxbeans plugin for development, and when I run add-on project from this IDE, Firefox runs with this add-on switched off (and switching on disabled). When I compile the XPI and add it to Firefox (3.6.12), it says about version incompatibility and doesn't work either. Doesn't matter, if I use http or https in the updateURL.
If this tag is empty, like this: <em:updateURL></em:updateURL> , everything works (but doesn't update itself, of course)
The solution was quite simple, though not obvious at a first glance.
In install.rdf <em:updateURL> should be after <em:targetApplication>, not before.
Hope this would help somebody, sometime.

Web Part Deployment in SharePoint

I've built a web part and after several deployments to a specific site, SharePoint suddenly won't give the option to deploy to a specifi site, a message is immediatelly displayed that the solution is deplyed globally.
I don't know what I did to cause this. I've been useing stsadmn -o addsolution method, except once when when I tried to just run the Setup.exe file.
Anyone has any idea why is it happenning and how to correct this.
Thanks,
EJM
First make sure to retract the solution (with stsadm), if it doesn't work, use -force/-override, and then delete with the same.
Than try to do it again, and it should work.

Resources