styles.css not updating when running in docker
See original GitHub issueI have a tailwind service in my docker-compose.yml with the following command:
command: "python manage.py tailwind start"
For some reason, it does not update the styles.css But if I exec into the same container and then manually run the same command, it does update the file
Here are the logs of the command running using docker-compose:
> theme@2.2.1 dev:sync
> run-p dev:tailwind sync
> theme@2.2.1 sync
> browser-sync start --config bs.config.js
> theme@2.2.1 dev:tailwind
> cross-env NODE_ENV=development tailwindcss --postcss -i ./src/styles.css -o ../static/css/dist/styles.css -w
[Browsersync] Watching files...
And here are the logs when I use exec to run the same command on the same container:
> theme@2.2.1 dev:sync
> run-p dev:tailwind sync
> theme@2.2.1 dev:tailwind
> cross-env NODE_ENV=development tailwindcss --postcss -i ./src/styles.css -o ../static/css/dist/styles.css -w
> theme@2.2.1 sync
> browser-sync start --config bs.config.js
[Browsersync] Watching files...
warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
Rebuilding...
Done in 307ms.
[Browsersync] File event [change] : ../static/css/dist/styles.css
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Docker reload does not reflect changes in CSS files
I've configured docker to reload automatically when i make changes to my project files. It works fine when i make changes in HTML...
Read more >Running with docker does not load css and js assets #46
Running using docker build -t snomedstorm-browser-nginx . docker run --name snowstorm-nginx -d -p 80:80 -v ...
Read more >CSS Files not updating - Laracasts
I'm having trouble getting my CSS changes to appear in my app. Some solutions I've tried: Setting 'sendfile off' in nginx.config Setting server...
Read more >Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >10 Most Common Bootstrap Mistakes That Developers Make
You can overwrite in your own stylesheet default bootstrap colors, styles, margins, paddings, everything. There is no need to touch the bootstrap.css ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, @roushikk! I’m still a Docker noob in many ways. Thanks for showing me a better way! 😃
Yes, there is. You usually have a base
docker-compose.yml
file and you extend it for different environments like dev, staging and production.So, you’ll have a base
docker-compose.yml
file without the tailwind service and then you’ll have adocker-compose.dev.yml
in which you’ll add the tailwind service.Official Docker documentation: https://docs.docker.com/compose/extends/