mirror of
https://github.com/chatmail/relay.git
synced 2026-06-10 05:31:08 +00:00
docker: rename docker/* files for consistency
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Check TLS certificate changes and reload services
|
||||
After=setup_chatmail.service
|
||||
After=chatmail-init.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[Unit]
|
||||
Description=Run container setup commands
|
||||
After=multi-user.target
|
||||
ConditionPathExists=/setup_chatmail_docker.sh
|
||||
ConditionPathExists=/chatmail-init.sh
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash /setup_chatmail_docker.sh
|
||||
ExecStart=/bin/bash /chatmail-init.sh
|
||||
RemainAfterExit=true
|
||||
WorkingDirectory=/opt/chatmail
|
||||
PassEnvironment=<envs_list>
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
SETUP_CHATMAIL_SERVICE_PATH="${SETUP_CHATMAIL_SERVICE_PATH:-/lib/systemd/system/setup_chatmail.service}"
|
||||
CHATMAIL_INIT_SERVICE_PATH="${CHATMAIL_INIT_SERVICE_PATH:-/lib/systemd/system/chatmail-init.service}"
|
||||
|
||||
# Whitelist only the env vars needed by setup_chatmail_docker.sh.
|
||||
# Whitelist only the env vars needed by chatmail-init.sh.
|
||||
# Forwarding all env vars (via printenv) would leak Docker internals,
|
||||
# orchestrator secrets, and other unrelated variables into systemd.
|
||||
env_vars="MAIL_DOMAIN CMDEPLOY_STAGES CHATMAIL_INI TLS_EXTERNAL_CERT_AND_KEY PATH"
|
||||
sed -i "s|<envs_list>|$env_vars|g" "$SETUP_CHATMAIL_SERVICE_PATH"
|
||||
sed -i "s|<envs_list>|$env_vars|g" "$CHATMAIL_INIT_SERVICE_PATH"
|
||||
|
||||
exec /lib/systemd/systemd "$@"
|
||||
|
||||
Reference in New Issue
Block a user