Commit graph

2 commits

Author SHA1 Message Date
2ae28fb0a7 fix: export .env vars with set -a so envsubst can see them
source without set -a sets vars in current shell but does not export them.
Child processes like envsubst cannot see unexported vars, causing all
template substitutions to produce empty strings.

Fix: set -a before source, set +a after — auto-exports every assigned var.
2026-02-28 02:04:26 +08:00
f82cd2d956 feat: add infra service deploy scripts
Add services/ directory with deploy scripts for system-level infrastructure
services. Each script reads INFRA_DIR pointing to the corresponding infra
module, sources its .env, substitutes config templates via envsubst, and
installs/enables systemd services. Zero hardcoded values — public-safe.

New scripts:
- services/email/deploy.sh      (Postfix + Dovecot + OpenDKIM + SpamAssassin)
- services/nginx/deploy.sh      (Nginx vhosts via envsubst)
- services/shadowsocks/server/deploy.sh  (shadowsocks-rust server)
- services/shadowsocks/client/deploy.sh  (sslocal + privoxy chain)
- services/frp/server/deploy.sh (frps)
- services/frp/client/deploy.sh (frpc)

README: add "Relationship with infra" section explaining the two-repo workflow
Makefile: add deploy-email, deploy-nginx, deploy-ss-{server,client},
          deploy-frp-{server,client} targets

Closes #6
2026-02-28 01:09:36 +08:00