|
|
@ -328,8 +328,7 @@ ssl_fallback_prepare() { |
|
|
|
done |
|
|
|
|
|
|
|
if [ "$volumes" ]; then |
|
|
|
config-add "\ |
|
|
|
services: |
|
|
|
init-config-add "\ |
|
|
|
$MASTER_TARGET_SERVICE_NAME: |
|
|
|
volumes: |
|
|
|
$volumes |
|
|
@ -365,9 +364,8 @@ ssl_plugin_cert-provider_prepare() { |
|
|
|
err "Failed to launch letsencrypt for certificate creation." |
|
|
|
return 1 |
|
|
|
} |
|
|
|
config-add "\ |
|
|
|
services: |
|
|
|
$MASTER_TARGET_SERVICE_NAME: |
|
|
|
init-config-add "\ |
|
|
|
$SERVICE_NAME: |
|
|
|
volumes: |
|
|
|
- $DATASTORE/$service/etc/letsencrypt:/etc/letsencrypt:ro |
|
|
|
" || return 1 |
|
|
@ -437,8 +435,8 @@ apache_code_dir() { |
|
|
|
setfacl -R -m g:"$www_data_gid":rx "$host_path" |
|
|
|
info "Set permission for read and traversal on '$host_path'." |
|
|
|
|
|
|
|
config-add " |
|
|
|
$MASTER_BASE_SERVICE_NAME: |
|
|
|
init-config-add " |
|
|
|
$SERVICE_NAME: |
|
|
|
volumes: |
|
|
|
- $host_path:$local_path |
|
|
|
" |
|
|
@ -475,8 +473,8 @@ apache_data_dirs() { |
|
|
|
setfacl -R -m g:"$www_data_gid":rwx "${dirs[@]}" |
|
|
|
setfacl -R -d -m g:"$www_data_gid":rwx "${dirs[@]}" |
|
|
|
|
|
|
|
config-add " |
|
|
|
$MASTER_BASE_SERVICE_NAME: |
|
|
|
init-config-add " |
|
|
|
$SERVICE_NAME: |
|
|
|
volumes: |
|
|
|
$( |
|
|
|
for d in "${data[@]}"; do |
|
|
@ -502,14 +500,14 @@ export -f deploy_files |
|
|
|
|
|
|
|
|
|
|
|
apache_core_rules_add() { |
|
|
|
local conf="$1" dst="/etc/apache2/conf-enabled/$BASE_SERVICE_NAME.conf" |
|
|
|
local conf="$1" dst="/etc/apache2/conf-enabled/$SERVICE_NAME.conf" |
|
|
|
debug "Adding core rule." |
|
|
|
echo "$conf" | file_put "$CONFIGSTORE/$BASE_SERVICE_NAME$dst" |
|
|
|
echo "$conf" | file_put "$CONFIGSTORE/$SERVICE_NAME$dst" |
|
|
|
config_hash=$(printf "%s\0" "$config_hash" "$conf" | md5_compat) |
|
|
|
config-add " |
|
|
|
$MASTER_BASE_SERVICE_NAME: |
|
|
|
init-config-add " |
|
|
|
$SERVICE_NAME: |
|
|
|
volumes: |
|
|
|
- $CONFIGSTORE/$BASE_SERVICE_NAME$dst:$dst:ro |
|
|
|
- $CONFIGSTORE/$SERVICE_NAME$dst:$dst:ro |
|
|
|
" |
|
|
|
} |
|
|
|
|
|
|
@ -851,8 +849,10 @@ apache_config_hash() { |
|
|
|
-name \*.conf -exec md5sum {} \; |
|
|
|
} | md5_compat) || exit 1 |
|
|
|
init-config-add " |
|
|
|
$MASTER_BASE_SERVICE_NAME: |
|
|
|
$SERVICE_NAME: |
|
|
|
labels: |
|
|
|
- compose.config_hash=$config_hash |
|
|
|
" |
|
|
|
} |
|
|
|
|
|
|
|
|