We’re running Discourse using AWS Elastic Beanstalk’s Docker environment, with a single Docker container running on each of 2 (or more) servers.
We noticed that the main stylesheet is 404ing about 50% of the time. I think this is because of the stylesheet cache implementation:
- A rebuild of the main stylesheet is triggered by e.g. adding a new category.
- One of the servers recompiles the stylesheet, writes it to its local filesystem, and updates the stylesheet path in the distributed cache.
- Both servers now serve the updated stylesheet path, but only one of the servers has the updated stylesheet in its filesystem.
Is my understanding of the issue correct? If so, it seems like this could potentially be solved by writing the stylesheet to the distributed cache, or a shared storage service like S3, rather than the local filesystem.