Skip to content
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

Feature/nginx stub module SCO-154254 #475

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions context/nginx/conf.d/stub.default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
server_name localhost;
listen 80;
access_log off;

location /nginx_status {
stub_status;
allow 127.0.0.1;
deny all;
}
}
11 changes: 11 additions & 0 deletions context/nginx/conf.d/stub.default.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
server_name localhost;
listen 80;
access_log off;

location /nginx_status {
stub_status;
allow 127.0.0.1;
deny all;
}
}
4 changes: 4 additions & 0 deletions generator/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,10 @@ static function ($endpoint) use ($projectData) {
$deploymentDir . DS . 'context' . DS . 'nginx' . DS . 'conf.d' . DS . 'debug.default.conf',
$twig->render('nginx/conf.d/debug.default.conf.twig', $projectData)
);
file_put_contents(
$deploymentDir . DS . 'context' . DS . 'nginx' . DS . 'stub.default.conf',
$twig->render('nginx/conf.d/stub.default.conf.twig', $projectData)
);
file_put_contents(
$deploymentDir . DS . 'context' . DS . 'nginx' . DS . 'entrypoint.sh',
$twig->render('nginx/entrypoint.sh.twig', $projectData)
Expand Down
11 changes: 11 additions & 0 deletions generator/src/templates/nginx/conf.d/stub.default.conf.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
server_name localhost;
listen 80;
access_log off;

location /nginx_status {
stub_status;
allow 127.0.0.1;
deny all;
}
}
1 change: 1 addition & 0 deletions images/common/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN mkdir -p /etc/nginx/template/ && chmod 0777 /etc/nginx/template/
COPY --chown=root:root nginx/nginx.original.conf /etc/nginx/nginx.conf
COPY --chown=root:root nginx/conf.d/frontend.default.conf.tmpl /etc/nginx/template/default.conf.tmpl
COPY --chown=root:root nginx/conf.d/resolver.conf.tmpl /etc/nginx/template/resolver.conf.tmpl
COPY --chown=root:root nginx/conf.d/stub.default.conf.tmpl /etc/nginx/conf.d/stub.conf
COPY --chown=root:root nginx/auth /etc/nginx/auth
COPY --chown=root:root nginx/entrypoint.sh /
RUN chmod +x /entrypoint.sh
Expand Down
Loading