# MyDay — systemd unit (D-043: the app runs behind Zoraxy; TLS terminates there). # # INSTALL (as root): # 1. build the static, CGO-free binary: # go build -trimpath -o /usr/local/bin/myday ./cmd/myday # 2. create the app dir (config.yaml + data/ live there) and drop in the config: # install -d -o -g # install -m 0640 -o -g config.yaml /config.yaml # 3. systemctl daemon-reload && systemctl enable --now myday # # Replace every below (path placeholders must resolve to ABSOLUTE # paths). `config.yaml` is gitignored — NEVER commit it (D-010). See # docs/deploy-zoraxy.md for the full deployment walkthrough. [Unit] Description=MyDay — Sechpoint employee app After=network-online.target Wants=network-online.target [Service] Type=simple User= Group= WorkingDirectory= # binary path, e.g. /usr/local/bin/myday (no inline comments — systemd keeps them) ExecStart= Environment=MYDAY_CONFIG=/config.yaml Restart=on-failure RestartSec=5s # The binary is static and CGO-free; at runtime the app writes only config.yaml, # data/ and the SQLite files inside WorkingDirectory (the wizard persists the # generated secrets there). ReadWritePaths keeps `ProtectSystem=strict` from # breaking those writes. NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ReadWritePaths= [Install] WantedBy=multi-user.target