-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static assets are not readable? #358
Comments
See the 'WHere to Store Data' from the docs here: https://hub.docker.com/_/redmine/ |
@LaurentGoderre thank you for your feedback. I know about volumes. One more reason why I've created the issue, if I run the same container with SQLite the assets are served correctly... PS: by the way, even if I'm using volume to serve assets through Nginx, I have the same problem with attachments which are stored in volume, mounted to container but are not readable because of permission problem |
I think those asset files are created by Redmine during initial startup, not by our entrypoint/image. 🤔 In your example, if you start Redmine first, then run your "readable" check (or exec into an existing Redmine instance and run your readable check), it should succeed: $ docker run --name foo -d --user redmine:redmine --pull=always redmine:alpine3.21
alpine3.21: Pulling from library/redmine
Digest: sha256:e36eb2d7b238eb2df867062e526afeb8898755ecb04bd26d706eae92bba9b800
Status: Image is up to date for redmine:alpine3.21
337fbd33883876acf32af064ef8914e67be3d2385526bada12583bbf4d9434a4
$ docker logs --tail=2 foo
* Listening on http://0.0.0.0:3000
Use Ctrl-C to stop
$ docker exec -it foo ruby -e "puts File.readable?('public/assets/tablesort-5.2.1.min-c6968762.js')"
true |
If you use $ docker diff foo | grep tablesort
A /usr/src/redmine/public/assets/tablesort-5.2.1.min-c6968762.js
A /usr/src/redmine/public/assets/tablesort-5.2.1.number.min-8a47560b.js |
Yes, the assets are generated by Redmine RoR engine, not by the docker wrapper. I just tested your hypothesis. Nope the check returns always false. |
That's weird -- as you can see, it was successful for me, so I don't know what's different about your setup. 🙈 |
One difference I see is that I attach volumes with configuration. Like |
What happens if you check the permissions outside of ruby?
|
the permissions is ok |
Hello
I'm using redmine:alpine3.21 on MacOS 15.1.1
I need to serve static files by Puma.
I'm running the container with the following command :
And rails does not serve the static assets:
I got 404 when issuing
wget http://127.0.0.1:3000/assets/tablesort-5.2.1.min-c6968762.js
I was debugging the static.rb middleware and I discovered that the assets generated when container starting are not readable.
docker exec -it --user redmine:redmine REDMINE sh
ruby -e "puts File.readable?('/usr/src/redmine/public/assets/tablesort-5.2.1.min-c6968762.js')"
I got falseCould someone explain me why I got this behaviour, please?
The text was updated successfully, but these errors were encountered: