about summary refs log tree commit diff
path: root/blog
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-31T16·30+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-31T16·30+0000
commit184404d5421bd052519f757450d8dbd9466a6e14 (patch)
tree3460877dd44a04fe1b7688f4c10079c2fa32e0f4 /blog
parent755554176d206bfbae8f8bbe19985620ec58a53d (diff)
Add deploy.nix to blog
Adding a deploy.nix to output docker images based on the <briefcase>.blog
derivation. See the deploy/README.md docs for more information.
Diffstat (limited to 'blog')
-rw-r--r--blog/deploy.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/blog/deploy.nix b/blog/deploy.nix
new file mode 100644
index 0000000000..734e91e41b
--- /dev/null
+++ b/blog/deploy.nix
@@ -0,0 +1,15 @@
+{
+  pkgs ? import <nixpkgs> {},
+  briefcase ? import <briefcase> {},
+  ...
+}:
+
+pkgs.dockerTools.buildLayeredImage {
+  name = "blog";
+  tag = "latest";
+  config.ExposedPorts = {
+    "4242" = {};
+  };
+  config.Cmd = [ "${briefcase.blog}/bin/server" ];
+  maxLayers = 120;
+}