Skip to content

Commit d502619

Browse files
[PR #2471/8a2774ae backport][stable-4.10] Include nginx snippets in the compose env (#2487)
Include nginx snippets in the compose env (#2471) Include the nginx snippets in the compose env Signed-off-by: Fabricio Aguiar <[email protected]> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED (cherry picked from commit 8a2774a) Co-authored-by: Fabricio Aguiar <[email protected]>
1 parent d8993c8 commit d502619

9 files changed

+71
-9
lines changed

dev/compose/Dockerfile.nginx

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This Dockerfile is meant to extract the nginx snippets from Dockerfile.rhel8
2+
FROM localhost/galaxy_ng/galaxy_ng:base as builder
3+
4+
USER root
5+
RUN mkdir -p /etc/nginx/pulp \
6+
&& ln $(pip show pulp_ansible | sed -n -e 's/Location: //p')/pulp_ansible/app/webserver_snippets/nginx.conf /etc/nginx/pulp/pulp_ansible.conf \
7+
&& ln $(pip show pulp_container | sed -n -e 's/Location: //p')/pulp_container/app/webserver_snippets/nginx.conf /etc/nginx/pulp/pulp_container.conf \
8+
&& cp /app/galaxy_ng/app/webserver_snippets/nginx.conf /etc/nginx/pulp/galaxy.conf
9+
10+
FROM docker.io/nginx:latest
11+
12+
RUN mkdir -p /etc/nginx/pulp
13+
COPY --from=builder /etc/nginx/pulp/*.conf /etc/nginx/pulp
14+
15+
# Run script uses standard ways to run the application
16+
CMD nginx -g "daemon off;"

dev/compose/aap.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ services:
101101
<<: *common-env
102102
image: "localhost/galaxy_ng/galaxy_ng:dev"
103103

104+
base_img_nginx: # Extracts nginx files from base_img
105+
depends_on:
106+
- base_img
107+
build:
108+
context: .
109+
dockerfile: Dockerfile.nginx
110+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
111+
104112
redis:
105113
image: "redis:5"
106114

@@ -286,8 +294,9 @@ services:
286294
"
287295
288296
nginx:
289-
image: "nginx:latest"
297+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
290298
depends_on:
299+
- base_img_nginx
291300
- postgres
292301
- migrations
293302
- api

dev/compose/certified-sync.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ services:
122122
<<: *common-env
123123
image: "localhost/galaxy_ng/galaxy_ng:dev"
124124

125+
base_img_nginx: # Extracts nginx files from base_img
126+
depends_on:
127+
- base_img
128+
build:
129+
context: .
130+
dockerfile: Dockerfile.nginx
131+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
132+
125133
redis:
126134
image: "redis:5"
127135

@@ -305,8 +313,9 @@ services:
305313
"
306314
307315
standalone-nginx:
308-
image: "nginx:latest"
316+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
309317
depends_on:
318+
- base_img_nginx
310319
- standalone-postgres
311320
- standalone-migrations
312321
- standalone-api
@@ -524,8 +533,9 @@ services:
524533
"
525534
526535
insights-nginx:
527-
image: "nginx:latest"
536+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
528537
depends_on:
538+
- base_img_nginx
529539
- insights-postgres
530540
- insights-migrations
531541
- insights-api

dev/compose/community.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ services:
111111
<<: *common-env
112112
image: "localhost/galaxy_ng/galaxy_ng:dev"
113113

114+
base_img_nginx: # Extracts nginx files from base_img
115+
depends_on:
116+
- base_img
117+
build:
118+
context: .
119+
dockerfile: Dockerfile.nginx
120+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
121+
114122
github:
115123
build:
116124
context: '../../profiles/community/github_mock'
@@ -288,8 +296,9 @@ services:
288296
"
289297
290298
nginx:
291-
image: "nginx:latest"
299+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
292300
depends_on:
301+
- base_img_nginx
293302
- postgres
294303
- migrations
295304
- api

dev/compose/insights.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ services:
102102
<<: *common-env
103103
image: "localhost/galaxy_ng/galaxy_ng:dev"
104104

105+
base_img_nginx: # Extracts nginx files from base_img
106+
depends_on:
107+
- base_img
108+
build:
109+
context: .
110+
dockerfile: Dockerfile.nginx
111+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
112+
105113
proxy:
106114
build:
107115
context: "../../profiles/insights/proxy"
@@ -286,8 +294,9 @@ services:
286294
"
287295
288296
nginx:
289-
image: "nginx:latest"
297+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
290298
depends_on:
299+
- base_img_nginx
291300
- postgres
292301
- migrations
293302
- api

dev/compose/standalone.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ services:
107107
<<: *common-env
108108
image: "localhost/galaxy_ng/galaxy_ng:dev"
109109

110+
base_img_nginx: # Extracts nginx files from base_img
111+
depends_on:
112+
- base_img
113+
build:
114+
context: .
115+
dockerfile: Dockerfile.nginx
116+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
117+
110118
redis:
111119
image: "redis:5"
112120

@@ -290,8 +298,9 @@ services:
290298
"
291299
292300
nginx:
293-
image: "nginx:latest"
301+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
294302
depends_on:
303+
- base_img_nginx
295304
- postgres
296305
- migrations
297306
- api

dev/nginx/certified-sync/insights.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ http {
7373
proxy_pass http://pulp-api;
7474
}
7575

76-
# include pulp/*.conf;
76+
include pulp/*.conf;
7777

7878
location / {
7979
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

dev/nginx/certified-sync/standalone.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ http {
7373
proxy_pass http://pulp-api;
7474
}
7575

76-
# include pulp/*.conf;
76+
include pulp/*.conf;
7777

7878
location / {
7979
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

dev/nginx/nginx.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ http {
7373
proxy_pass http://pulp-api;
7474
}
7575

76-
# include pulp/*.conf;
76+
include pulp/*.conf;
7777

7878
location / {
7979
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)