From 784e35bf553bc7f426aa2f663db6d32121431590 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 26 Dec 2021 22:37:57 -0500 Subject: feat(grfn/bbbg): Production deployment Start of a production deployment of the app with nixos+terraform, using provisioners and null-resources to provision nixos machines a'la espes. Change-Id: I2ddaed76d0037dadbf9fc9e2ee27e9e67a852228 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4695 Reviewed-by: grfn Autosubmit: grfn Tested-by: BuildkiteCI --- users/grfn/bbbg/shell.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'users/grfn/bbbg/shell.nix') diff --git a/users/grfn/bbbg/shell.nix b/users/grfn/bbbg/shell.nix index 195562519ed4..48bcd73759d0 100644 --- a/users/grfn/bbbg/shell.nix +++ b/users/grfn/bbbg/shell.nix @@ -11,6 +11,15 @@ mkShell { openjdk11_headless postgresql_12 nix-prefetch-git + (writeShellScriptBin "terraform" '' + set -e + module=$(nix-build ~/code/depot -A users.grfn.bbbg.tf.module) + rm -f ~/tfstate/bbbg/*.json + cp ''${module}/*.json ~/tfstate/bbbg + exec ${depot.users.grfn.bbbg.tf.terraform}/bin/terraform \ + -chdir=/home/grfn/tfstate/bbbg \ + "$@" + '') ]; PGHOST = "localhost"; -- cgit 1.4.1