summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Wilhelmsson <samuel.wilhelmsson@gmail.com>2025-01-12 00:15:39 +0100
committerSamuel Wilhelmsson <samuel.wilhelmsson@gmail.com>2025-01-12 00:15:39 +0100
commiteccf849e5054b1f1f78d2b6c75d097fae3fc4df8 (patch)
tree30dc4d90daa7ea1fa035cf977449ed66c2c20d29
parente4fc03baf716f879b44c6ce18781d3dc702354c3 (diff)
downloadtinygram-eccf849e5054b1f1f78d2b6c75d097fae3fc4df8.tar.gz
tinygram-eccf849e5054b1f1f78d2b6c75d097fae3fc4df8.zip
clean up deploy after new secret magic
-rwxr-xr-xdeploy21
-rw-r--r--dev.toml.agebox22
-rw-r--r--main.go3
-rw-r--r--prod.toml.ageboxbin702 -> 702 bytes
-rw-r--r--service/tinygram.service (renamed from service/tinygram.service.template)1
5 files changed, 13 insertions, 34 deletions
diff --git a/deploy b/deploy
index 3c5c89b..dda2e7f 100755
--- a/deploy
+++ b/deploy
@@ -35,30 +35,9 @@
(print "-- syncing assets --")
($ rsync ;rsync-asset-args)
-(print "-- creating service locally--")
-(def template (slurp "service/tinygram.service.template"))
-
-(print "-- decrypting env --")
-($ agebox decrypt --all)
-(def envfile (slurp "prod.env"))
-($ agebox encrypt --all)
-(print "-- encrypting env --")
-
-(def env-statements
- (filter (fn [s] (not (empty? s)))
- (string/split "\n" envfile)))
-
-(def env-block (string ;(map (fn [env] (string "Environment=\"" env "\"\n")) env-statements)))
-
-(spit "service/tinygram.service"
- (peg/replace "<1>\n" env-block template))
-
(print "-- syncing service --")
($ rsync ;rsync-service-args)
-(print "-- cleaning up service locally --")
-($ rm "service/tinygram.service")
-
(print "-- cleaning up binary --")
($ rm "tinygram")
diff --git a/dev.toml.agebox b/dev.toml.agebox
index 1989b72..89bca54 100644
--- a/dev.toml.agebox
+++ b/dev.toml.agebox
@@ -1,11 +1,13 @@
age-encryption.org/v1
--> ssh-ed25519 wo5T/g BnFfGb48JE4goOzqwUvZWLCAJ/vf8G2rtZutL7mfoQc
-5d4+i/uGRkHCSUrTB0o2d0eSmdM/lBthnWD456deRB8
--> ssh-ed25519 +GzdqQ hTsdxkTluOiwfyRwXLXlwvClMWSEtHjnZwd0kGt67Tk
-m2OT4MGHOmoLt7sDQWqGugVl+fXqTvXWphEGPbkHJs8
--> ssh-ed25519 juKS7A td9YKXjh/DbK8vnAkK9mil7Vk8UXs0IieA7ylO8ID0s
-9AdnwdeQwYAtY3yPgXalFa7KZCO5gSVQ96RywOk7tnM
--> X25519 1OVcu/1thO7JEc8JSE/nhcZg6xREHATIKzhW6uAnEEs
-XbKwvmPdfdSwnFm5XzYz43XxkXxa10ZmyFRPvSm0Xnw
---- owhb71cQZqfFSUW2RNrIqU8DfL6A6I8WEz8I6NcO1ZA
-]<YC4m@RAh T>R(7%Vutц,bq5Cbo ·\14|2EduuImO'*0,6Iެ\] ͻQ߹b1ۼx" }Î \ No newline at end of file
+-> ssh-ed25519 wo5T/g XguCVgcGB/kr/JkQx5bxie57pr7GQ6LVjjjwlWdjjic
+b22vtof9TRxGKFEqfiN+P17EYAssJp/KSGyJqlnNjCQ
+-> ssh-ed25519 +GzdqQ cT0Hma4ThjG8J9RJL4N/RcQWMiKdb/MsuHU9+SVjWk8
+7XRdb4IDkb3B3SBRi/eZuGdHj8hFYe1cXtuErk7jcH0
+-> ssh-ed25519 juKS7A nxhl4lwIvNuDwAAhJHHMPSYRU3jYFtj8jjms1ofIQg0
+q2Nuynd8LMrcajOKt2cjDnkgnVwyqvC6V0yiKD0jOzY
+-> X25519 KQwvJAtjIQsNaVFQvujO0ncFzyt5K0JzDs88JE88f2k
+0aAxT/pKcJr1hQxyL5UB/qY5cWV5cLUzS9Iiue2jles
+--- BCGHS62ln9F99UYokcZAmefQgQK3M9X04pWfsw99biY
+ C
+lH󮠣45:٠-T
+SN<{3_brFg]!H/ ?wjdѼU̇طNtZf+acpas 0-#6{{6 6y($ \ No newline at end of file
diff --git a/main.go b/main.go
index b24e683..fe775fa 100644
--- a/main.go
+++ b/main.go
@@ -44,8 +44,7 @@ var devenv string
var config Config
func main() {
-
- secret, err := secrets.DecryptSecret(devenv)
+ secret, err := secrets.DecryptSecret(prodenv)
if err != nil {
log.Errorf("could not decrypt a secret", err)
os.Exit(1)
diff --git a/prod.toml.agebox b/prod.toml.agebox
index 0b89ad6..55ab3fe 100644
--- a/prod.toml.agebox
+++ b/prod.toml.agebox
Binary files differ
diff --git a/service/tinygram.service.template b/service/tinygram.service
index 6e49781..0667884 100644
--- a/service/tinygram.service.template
+++ b/service/tinygram.service
@@ -2,7 +2,6 @@
Description=Tinygram Service
[Service]
-<1>
Type=simple
User=tinygram
WorkingDirectory=/opt/tinygram