784e35bf55
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 <grfn@gws.fyi> Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
29 lines
637 B
Nix
29 lines
637 B
Nix
let
|
|
depot = import ../../.. {};
|
|
in
|
|
with depot.third_party.nixpkgs;
|
|
|
|
mkShell {
|
|
buildInputs = [
|
|
arion
|
|
depot.third_party.clj2nix
|
|
clojure
|
|
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";
|
|
PGUSER = "bbbg";
|
|
PGDATABASE = "bbbg";
|
|
PGPASSWORD = "password";
|
|
}
|