Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
546f8be1
Commit
546f8be1
authored
May 10, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Start using caddy
parent
8f781c5b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
75 deletions
+75
-75
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+8
-8
software/caddy-frontend/common.cfg
software/caddy-frontend/common.cfg
+4
-4
software/caddy-frontend/instance-apache-frontend.cfg
software/caddy-frontend/instance-apache-frontend.cfg
+40
-40
software/caddy-frontend/templates/Caddyfile.in
software/caddy-frontend/templates/Caddyfile.in
+0
-0
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
.../caddy-frontend/templates/apache-custom-slave-list.cfg.in
+2
-2
software/caddy-frontend/templates/apache-graceful-script.sh.in
...are/caddy-frontend/templates/apache-graceful-script.sh.in
+0
-21
software/caddy-frontend/templates/caddy-graceful-script.sh.in
...ware/caddy-frontend/templates/caddy-graceful-script.sh.in
+21
-0
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
546f8be1
...
...
@@ -19,7 +19,7 @@ md5sum = f686f765e55d1dce2e55a400f0714b3e
[template-apache-frontend]
filename = instance-apache-frontend.cfg
md5sum =
b6a2c860ea1cd4bc9d185c7108c52d0a
md5sum =
597dd12fd1449c62df84677d9734e624
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
...
...
@@ -27,7 +27,7 @@ md5sum = 9e76028df7e93d3e32982884d5dc0913
[template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum =
24e514ad6f15859229db46f24a8cd280
md5sum =
a18268224f0a9fac251041fb5883417c
[template-slave-configuration]
filename = templates/custom-virtualhost.conf.in
...
...
@@ -37,13 +37,13 @@ md5sum = d103143e5d50682bd5ad43117d82e2fa
filename = templates/replicate-publish-slave-information.cfg.in
md5sum = 665e83d660c9b779249b2179d7ce4b4e
[template-
apache
-frontend-configuration]
filename = templates/
apache.conf
.in
[template-
caddy
-frontend-configuration]
filename = templates/
Caddyfile
.in
md5sum = 75ba24f0447240db20250a88a1ebc524
[template-custom-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum =
24e514ad6f15859229db46f24a8cd280
md5sum =
a18268224f0a9fac251041fb5883417c
[template-not-found-html]
filename = templates/notfound.html
...
...
@@ -97,6 +97,6 @@ md5sum = 82d74a7f2aceb2b4a7acc6259291b7f2
filename = templates/apache-lazy-script-call.sh.in
md5sum = ebe5d3d19923eb812a40019cb11276d8
[template-
apache
-graceful-script]
filename = templates/
apache
-graceful-script.sh.in
md5sum =
41299cc64200e7b8217fb9dec20bb8b9
[template-
caddy
-graceful-script]
filename = templates/
caddy
-graceful-script.sh.in
md5sum =
d5a00bde52b0720e210fcd8ef352a583
software/caddy-frontend/common.cfg
View file @
546f8be1
...
...
@@ -70,9 +70,9 @@ filename = custom-virtualhost.conf.in
<=download-template
filename = replicate-publish-slave-information.cfg.in
[template-
apache
-frontend-configuration]
[template-
caddy
-frontend-configuration]
<=download-template
filename =
apache.conf
.in
filename =
Caddyfile
.in
[template-custom-slave-list]
<=download-template
...
...
@@ -137,9 +137,9 @@ mode = 0644
<=download-template
filename = apache-lazy-script-call.sh.in
[template-
apache
-graceful-script]
[template-
caddy
-graceful-script]
<=download-template
filename =
apache
-graceful-script.sh.in
filename =
caddy
-graceful-script.sh.in
[template-nginx-eventsource-slave-virtualhost]
<=download-template
...
...
software/caddy-frontend/instance-apache-frontend.cfg
View file @
546f8be1
This diff is collapsed.
Click to expand it.
software/caddy-frontend/templates/
apache.conf
.in
→
software/caddy-frontend/templates/
Caddyfile
.in
View file @
546f8be1
File moved
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
View file @
546f8be1
...
...
@@ -74,7 +74,7 @@ crl = {{ custom_ssl_directory }}/crl/
{# Add slave log directory to the slave log access dict #}
{% do slave_log_dict.__setitem__(slave_reference, slave_log_folder) %}
{% set slave_log_access_url = 'https://' + slave_reference + ':${'+ slave_password_section +':passwd}@[' + frontend_configuration.get('
apache-ipv6') + ']:' + frontend_configuration.get('apache
-https-port') + '/' + slave_reference.lower() + '/' %}
{% set slave_log_access_url = 'https://' + slave_reference + ':${'+ slave_password_section +':passwd}@[' + frontend_configuration.get('
caddy-ipv6') + ']:' + frontend_configuration.get('caddy
-https-port') + '/' + slave_reference.lower() + '/' %}
{% do slave_publish_dict.__setitem__('log-access', slave_log_access_url) %}
{% do slave_publish_dict.__setitem__('slave-reference', slave_reference) %}
{% do slave_publish_dict.__setitem__('public-ipv4', public_ipv4) %}
...
...
@@ -136,7 +136,7 @@ bytes = 8
recipe = plone.recipe.command
stop-on-error = true
htaccess-path = {{apache_configuration_directory}}/.{{slave_reference}}.htaccess
command = {{frontend_configuration.get('
apache
-directory')}}/bin/htpasswd -cb ${:htaccess-path} {{ slave_reference }} {{ '${' + slave_password_section + ':passwd}' }}
command = {{frontend_configuration.get('
caddy
-directory')}}/bin/htpasswd -cb ${:htaccess-path} {{ slave_reference }} {{ '${' + slave_password_section + ':passwd}' }}
{# ################################################## #}
{# Set Slave Certificates if needed #}
...
...
software/caddy-frontend/templates/apache-graceful-script.sh.in
deleted
100644 → 0
View file @
8f781c5b
#!/bin/sh
RUN_DIR
={{
directory_run
}}
ETC_DIR
={{
directory_etc
}}
APACHE_SIGNATURE_FILE
=
$RUN_DIR
/apache_configuration.signature
NAPACHE_SIGNATURE_FILE
=
$RUN_DIR
/napache_configuration.signature
touch
$APACHE_SIGNATURE_FILE
sha256sum
$ETC_DIR
/apache
*
.conf
$ETC_DIR
/apache-
*
.d/
*
.conf
$ETC_DIR
/apache-
*
.d/ssl/
*
.
*
key
$ETC_DIR
/apache-
*
.d/ssl/
*
.
*
crt
*
|
sort
-k
66
>
$NAPACHE_SIGNATURE_FILE
# If no diff, no restart for now
if
diff
"
$APACHE_SIGNATURE_FILE
"
"
$NAPACHE_SIGNATURE_FILE
"
;
then
echo
"Nothing Changed, so nothing to reload"
exit
0
fi
echo
"Reloading apache.."
{{
apache_graceful_reload_command
}}
mv
"
$NAPACHE_SIGNATURE_FILE
"
"
$APACHE_SIGNATURE_FILE
"
software/caddy-frontend/templates/caddy-graceful-script.sh.in
0 → 100644
View file @
546f8be1
#!/bin/sh
RUN_DIR
={{
directory_run
}}
ETC_DIR
={{
directory_etc
}}
CADDY_SIGNATURE_FILE
=
$RUN_DIR
/caddy_configuration.signature
NCADDY_SIGNATURE_FILE
=
$RUN_DIR
/ncaddy_configuration.signature
touch
$CADDY_SIGNATURE_FILE
sha256sum
$ETC_DIR
/Caddyfile
$ETC_DIR
/caddy-
*
.d/
*
.conf
$ETC_DIR
/caddy-
*
.d/ssl/
*
.
*
key
$ETC_DIR
/caddy-
*
.d/ssl/
*
.
*
crt
*
|
sort
-k
66
>
$NCADDY_SIGNATURE_FILE
# If no diff, no restart for now
if
diff
"
$CADDY_SIGNATURE_FILE
"
"
$NCADDY_SIGNATURE_FILE
"
;
then
echo
"Nothing Changed, so nothing to reload"
exit
0
fi
echo
"Reloading caddy.."
{{
caddy_graceful_reload_command
}}
mv
"
$NCADDY_SIGNATURE_FILE
"
"
$CADDY_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