Skip to content

Commit 8a2774a

Browse files
authored
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
1 parent 91c47c4 commit 8a2774a

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

@@ -289,8 +297,9 @@ services:
289297
"
290298
291299
nginx:
292-
image: "nginx:latest"
300+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
293301
depends_on:
302+
- base_img_nginx
294303
- postgres
295304
- migrations
296305
- 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

@@ -308,8 +316,9 @@ services:
308316
"
309317
310318
standalone-nginx:
311-
image: "nginx:latest"
319+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
312320
depends_on:
321+
- base_img_nginx
313322
- standalone-postgres
314323
- standalone-migrations
315324
- standalone-api
@@ -527,8 +536,9 @@ services:
527536
"
528537
529538
insights-nginx:
530-
image: "nginx:latest"
539+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
531540
depends_on:
541+
- base_img_nginx
532542
- insights-postgres
533543
- insights-migrations
534544
- 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'
@@ -291,8 +299,9 @@ services:
291299
"
292300
293301
nginx:
294-
image: "nginx:latest"
302+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
295303
depends_on:
304+
- base_img_nginx
296305
- postgres
297306
- migrations
298307
- 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"
@@ -289,8 +297,9 @@ services:
289297
"
290298
291299
nginx:
292-
image: "nginx:latest"
300+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
293301
depends_on:
302+
- base_img_nginx
294303
- postgres
295304
- migrations
296305
- 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

@@ -293,8 +301,9 @@ services:
293301
"
294302
295303
nginx:
296-
image: "nginx:latest"
304+
image: "localhost/galaxy_ng/galaxy_ng:nginx"
297305
depends_on:
306+
- base_img_nginx
298307
- postgres
299308
- migrations
300309
- 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)