add basic container, configure git repo structure, add sops addon
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[Unit]
|
||||
Requires=sops-decrypt.service
|
||||
After=sops-decrypt.service
|
||||
19
hosts/home-morefine/systemd/sops/sops-decrypt.service
Normal file
19
hosts/home-morefine/systemd/sops/sops-decrypt.service
Normal file
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=Decrypt SOPS secrets before Docker starts
|
||||
DefaultDependencies=no
|
||||
Before=docker.service
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/srv/gitops
|
||||
Environment=SOPS_AGE_KEY_FILE=/root/.config/sops/age/keys.txt
|
||||
|
||||
# твой скрипт расшифровки (держи в репо или в /usr/local/bin)
|
||||
ExecStart=/srv/gitops/homelab-infra/lab-home/sops-decrypt.sh
|
||||
|
||||
TimeoutStartSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
8
hosts/home-morefine/systemd/sops/sops-install-oneoff.sh
Normal file
8
hosts/home-morefine/systemd/sops/sops-install-oneoff.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
sudo install -D -m 0644 systemd/sops-decrypt.service /etc/systemd/system/sops-decrypt.service
|
||||
sudo install -D -m 0644 systemd/docker.service.d/10-sops-decrypt.conf /etc/systemd/system/docker.service.d/10-sops-decrypt.conf
|
||||
|
||||
# сам скрипт
|
||||
sudo install -D -m 0755 systemd/sops-decrypt-all /usr/local/bin/sops-decrypt-all
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable sops-decrypt.service
|
||||
Reference in New Issue
Block a user