Skip to content

Commit

Permalink
Upgrade pulp-web image to latest nginx image & fix publishing both ar…
Browse files Browse the repository at this point in the history
…m+amd variants

fixes: #644
fixes: #702
  • Loading branch information
gerrod3 committed Jan 2, 2025
1 parent 33ec895 commit 0bec151
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGES/644.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade pulp-web images to use latest nginx images.
1 change: 1 addition & 0 deletions CHANGES/702.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed publishing arm64 & amd64 variants for pulp-web image.
4 changes: 2 additions & 2 deletions images/compose/assets/bin/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ fi
echo "Nameserver is: $NAMESERVER"

echo "Generating nginx config"
envsubst '$NAMESERVER' < /etc/opt/rh/rh-nginx116/nginx/nginx.conf.template > /etc/opt/rh/rh-nginx116/nginx/nginx.conf
envsubst '$NAMESERVER' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf

# We cannot use upstream server groups with a DNS resolver without nginx plus
# So we modifying the files to use the variables rather than the upstream server groups
for file in /opt/app-root/etc/nginx.default.d/*.conf ; do
for file in /etc/nginx/pulp/*.conf ; do
echo "Modifying $file"
sed -i 's/pulp-api/$pulp_api:24817/' $file
sed -i 's/pulp-content/$pulp_content:24816/' $file
Expand Down
3 changes: 2 additions & 1 deletion images/compose/assets/nginx/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ http {

# static files that can change dynamically, or are needed for TLS
# purposes are served through the webserver.
# Should all of our requests for static files still be rooted through /opt?
root /opt/app-root/src;

location /pulp/content/ {
Expand Down Expand Up @@ -73,7 +74,7 @@ http {
proxy_pass http://$pulp_api:24817;
}

include /opt/app-root/etc/nginx.default.d/*.conf;
include /etc/nginx/pulp/*.conf;

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
2 changes: 1 addition & 1 deletion images/compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ services:
user: root
volumes:
- "./assets/bin/nginx.sh:/usr/bin/nginx.sh:Z"
- "./assets/nginx/nginx.conf.template:/etc/opt/rh/rh-nginx116/nginx/nginx.conf.template:Z"
- "./assets/nginx/nginx.conf.template:/etc/nginx/nginx.conf.template:Z"
restart: always

pulp_api:
Expand Down
6 changes: 3 additions & 3 deletions images/pulp-minimal/nightly/Containerfile.webserver
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ RUN ln $(pip3 show pulp_python | sed -n -e 's/Location: //p')/pulp_python/app/we



FROM docker.io/centos/nginx-116-centos7:1.16
FROM docker.io/nginx:latest


COPY --from=builder /etc/nginx/pulp/*.conf "${NGINX_DEFAULT_CONF_PATH}"/
RUN mkdir -p /etc/nginx/pulp
COPY --from=builder /etc/nginx/pulp/*.conf /etc/nginx/pulp

# Run script uses standard ways to run the application
CMD nginx -g "daemon off;"
6 changes: 3 additions & 3 deletions images/pulp-minimal/stable/Containerfile.webserver
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ RUN ln $(pip3 show pulp_python | sed -n -e 's/Location: //p')/pulp_python/app/we



FROM docker.io/centos/nginx-116-centos7:1.16
FROM docker.io/nginx:latest


COPY --from=builder /etc/nginx/pulp/*.conf "${NGINX_DEFAULT_CONF_PATH}"/
RUN mkdir -p /etc/nginx/pulp
COPY --from=builder /etc/nginx/pulp/*.conf /etc/nginx/pulp

# Run script uses standard ways to run the application
CMD nginx -g "daemon off;"

0 comments on commit 0bec151

Please sign in to comment.