Open GeorgFleig opened 8 months ago
That comment may be wrong. If I remember correctly, the static file are copied to the nginx (pulp-web) container and served from there.
Edit: But maybe that's not true anymore? This line looks a bit forgotten here: https://github.com/pulp/pulp-oci-images/blob/latest/images/pulp-minimal/nightly/Containerfile.webserver#L5
We can confirm this issue exists.
It might be an issue in pulpcore (because we use the whitenoise app to serve static content).
It turns out it was a configuration mistake on my side. Somehow I did set
STATIC_ROOT = "/var/lib/pulp/assets/"
instead of
STATIC_ROOT = "/var/lib/operator/static/"
Now with the correct path the API container is serving the static files as expected. Sorry for the noise.
So from my side the issue can be closed. I will leave this up to you though due to your comments about being able to confirm this (or another?) issue. Not sure if it is just a similar mistake with the configuration.
Hello , @mikedep333 @GeorgFleig @mdellweg
This thread similar to what I am looking for, so I put my question here.
I have some home made gpg keys, I'd like to put them as static files on pulp server, so our repo can download them.
My pulp instance is run on docker-composer(pulp core 3.49.4, rpm 3.25.2), and I have two api instance:
compose-pulp_api-1
compose-pulp_api-2
the images/compose/assets/settings.py
has STATIC_ROOT = "/var/lib/operator/static/"
My question is:
1) where should I put these gpe keys files?
I check inside one compose-pulp_api-1 conainer, it has something under /var/lib/operator:
bash-5.1$ ls -lh /var/lib/operator/static/
total 4.0K
drwxr-xr-x 2 pulp pulp 72 Apr 17 13:57 import_export
drwxr-xr-x 7 pulp pulp 63 Apr 17 13:57 rest_framework
bash-5.1$ ls -lh /var/lib/operator/static/import_export/
total 0
lrwxrwxrwx 1 pulp pulp 91 Apr 17 13:57 action_formats.js -> /usr/local/lib/python3.9/site-packages/import_export/static/import_export/action_formats.js
lrwxrwxrwx 1 pulp pulp 89 Apr 17 13:57 guess_format.js -> /usr/local/lib/python3.9/site-packages/import_export/static/import_export/guess_format.js
lrwxrwxrwx 1 pulp pulp 84 Apr 17 13:57 import.css -> /usr/local/lib/python3.9/site-packages/import_export/static/import_export/import.css
bash-5.1$ ls -lh /var/lib/operator/static/rest_framework/
total 0
2) how to access these static gpg files? what is the url? wget https://xx.xx.xx/static/my.gpg?
? do I need to configure it somewhere in ngix conf?
If there is some example to share? Sorry for the naive questions.
Thanks in advance !
Version pulp/pulp-minimal:3.49.0
Describe the bug According to the nginx config (https://github.com/pulp/pulp-oci-images/blob/latest/images/compose/assets/nginx/nginx.conf.template) the static files are supposed to be served by the API container:
However the API container is not serving them when I browse the API using the browser. Access log from the API container and nginx:
Does this need to be activated first? Or are the assets served on another path?
To Reproduce Steps to reproduce the behavior: Use docker-compose or another tool to set up single-process images: https://github.com/pulp/pulp-oci-images/tree/latest/images/compose
Expected behavior API container serves static files.
Additional context Add any other context about the problem here. Please provide links to any previous discussions via Discourse or Bugzilla.