Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Le Bouter
slapos
Commits
37afcb43
Commit
37afcb43
authored
Nov 30, 2018
by
Łukasz Nowak
Committed by
Łukasz Nowak
Dec 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Make nginx like caddy
parent
fc9dd002
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
9 deletions
+43
-9
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+5
-1
software/caddy-frontend/common.cfg
software/caddy-frontend/common.cfg
+5
-0
software/caddy-frontend/instance-apache-frontend.cfg.in
software/caddy-frontend/instance-apache-frontend.cfg.in
+11
-8
software/caddy-frontend/templates/nginx-graceful-script.sh.in
...ware/caddy-frontend/templates/nginx-graceful-script.sh.in
+22
-0
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
37afcb43
...
@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b
...
@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b
[template-apache-frontend]
[template-apache-frontend]
filename = instance-apache-frontend.cfg.in
filename = instance-apache-frontend.cfg.in
md5sum =
822e78eea24952ed1f748118a499f1d9
md5sum =
97cecc896403991753cfd75e2962250c
[template-apache-replicate]
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
filename = instance-apache-replicate.cfg.in
...
@@ -108,6 +108,10 @@ md5sum = ebe5d3d19923eb812a40019cb11276d8
...
@@ -108,6 +108,10 @@ md5sum = ebe5d3d19923eb812a40019cb11276d8
filename = templates/caddy-graceful-script.sh.in
filename = templates/caddy-graceful-script.sh.in
md5sum = 455f8765a3afd39fb78562fb9e326c42
md5sum = 455f8765a3afd39fb78562fb9e326c42
[template-nginx-graceful-script]
filename = templates/nginx-graceful-script.sh.in
md5sum = 43e8ca96f2e64d21c8fb1e96282c1469
[caddyprofiledeps-setup]
[caddyprofiledeps-setup]
filename = setup.py
filename = setup.py
md5sum = d9b6476bb0b36cf463fddb00d41dfbaa
md5sum = d9b6476bb0b36cf463fddb00d41dfbaa
...
...
software/caddy-frontend/common.cfg
View file @
37afcb43
...
@@ -93,6 +93,7 @@ monitor_template = ${monitor-template:output}
...
@@ -93,6 +93,7 @@ monitor_template = ${monitor-template:output}
template_cached_slave_virtualhost = ${template-cached-slave-virtualhost:target}
template_cached_slave_virtualhost = ${template-cached-slave-virtualhost:target}
template_caddy_frontend_configuration = ${template-caddy-frontend-configuration:target}
template_caddy_frontend_configuration = ${template-caddy-frontend-configuration:target}
template_caddy_graceful_script = ${template-caddy-graceful-script:target}
template_caddy_graceful_script = ${template-caddy-graceful-script:target}
template_nginx_graceful_script = ${template-nginx-graceful-script:target}
template_caddy_lazy_script_call = ${template-caddy-lazy-script-call:target}
template_caddy_lazy_script_call = ${template-caddy-lazy-script-call:target}
template_default_slave_virtualhost = ${template-default-slave-virtualhost:target}
template_default_slave_virtualhost = ${template-default-slave-virtualhost:target}
template_empty = ${template-empty:target}
template_empty = ${template-empty:target}
...
@@ -227,6 +228,10 @@ filename = apache-lazy-script-call.sh.in
...
@@ -227,6 +228,10 @@ filename = apache-lazy-script-call.sh.in
<=download-template
<=download-template
filename = caddy-graceful-script.sh.in
filename = caddy-graceful-script.sh.in
[template-nginx-graceful-script]
<=download-template
filename = nginx-graceful-script.sh.in
[template-nginx-eventsource-slave-virtualhost]
[template-nginx-eventsource-slave-virtualhost]
<=download-template
<=download-template
filename = nginx-eventsource-slave.conf.in
filename = nginx-eventsource-slave.conf.in
...
...
software/caddy-frontend/instance-apache-frontend.cfg.in
View file @
37afcb43
...
@@ -525,6 +525,17 @@ extra-context =
...
@@ -525,6 +525,17 @@ extra-context =
key directory_bin directory:bin
key directory_bin directory:bin
key caddy_graceful_reload_command caddy-configuration:frontend-graceful-command
key caddy_graceful_reload_command caddy-configuration:frontend-graceful-command
[frontend-nginx-graceful]
< = jinja2-template-base
template = {{ parameter_dict['template_nginx_graceful_script'] }}
rendered = ${directory:etc-run}/frontend-nginx-safe-graceful
mode = 0700
extra-context =
key directory_run directory:run
key directory_etc directory:etc
key directory_bin directory:bin
key nginx_graceful_reload_command nginx-configuration:nginx-graceful-command
[frontend-caddy-lazy-graceful]
[frontend-caddy-lazy-graceful]
< = jinja2-template-base
< = jinja2-template-base
template = {{ parameter_dict['template_caddy_lazy_script_call'] }}
template = {{ parameter_dict['template_caddy_lazy_script_call'] }}
...
@@ -702,14 +713,6 @@ nginx-configuration-verification = ${nginx-wrapper:wrapper-path} -validate
...
@@ -702,14 +713,6 @@ nginx-configuration-verification = ${nginx-wrapper:wrapper-path} -validate
ssl_certificate = ${ca-frontend:cert-file}
ssl_certificate = ${ca-frontend:cert-file}
ssl_key = ${ca-frontend:key-file}
ssl_key = ${ca-frontend:key-file}
[frontend-nginx-graceful]
< = jinja2-template-base
template = {{ parameter_dict['template_wrapper'] }}
rendered = ${directory:etc-run}/frontend-nginx-safe-graceful
mode = 0700
extra-context =
key content nginx-configuration:nginx-graceful-command
[promise-nginx-configuration]
[promise-nginx-configuration]
< = jinja2-template-base
< = jinja2-template-base
template = {{ parameter_dict['template_wrapper'] }}
template = {{ parameter_dict['template_wrapper'] }}
...
...
software/caddy-frontend/templates/nginx-graceful-script.sh.in
0 → 100644
View file @
37afcb43
#!/bin/sh
RUN_DIR
={{
directory_run
}}
ETC_DIR
={{
directory_etc
}}
BIN_DIR
={{
directory_bin
}}
NGINX_SIGNATURE_FILE
=
$RUN_DIR
/nginx_configuration.signature
NNGINX_SIGNATURE_FILE
=
$RUN_DIR
/nnginx_configuration.signature
touch
$NGINX_SIGNATURE_FILE
sha256sum
$ETC_DIR
/nginx.cfg
$ETC_DIR
/nginx-slave-conf.d/
*
.conf |
sort
-k
66
>
$NNGINX_SIGNATURE_FILE
# If no diff, no restart for now
if
diff
"
$NGINX_SIGNATURE_FILE
"
"
$NNGINX_SIGNATURE_FILE
"
;
then
echo
"Nothing Changed, so nothing to reload"
exit
0
fi
echo
"Reloading nginx.."
{{
nginx_graceful_reload_command
}}
mv
"
$NNGINX_SIGNATURE_FILE
"
"
$NGINX_SIGNATURE_FILE
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment