From bbbfb854c22f5baab4a6f7a431d7593f91c0c91f Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 20 May 2017 15:56:34 -0700 Subject: Add docker/boxfiles --- box.rb | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 box.rb (limited to 'box.rb') diff --git a/box.rb b/box.rb new file mode 100644 index 0000000..97486a6 --- /dev/null +++ b/box.rb @@ -0,0 +1,47 @@ +from "xena/go-mini:1.8.1" + +### setup go +run "go1.8.1 download" + +### Copy files +run "mkdir -p /site" + +def debug?() + getenv("DEBUG") == "yes" +end + +def debug!() + run "apk add --no-cache bash" + debug +end + +def put(file) + copy "./#{file}", "/site/#{file}" +end + +files = [ + "blog", + "templates", + "gops.go", + "hash.go", + "html.go", + "main.go", + "rice-box.go", + "rss.go", +] + +files.each { |x| put x } + +copy "vendor/", "/root/go/src/" + +### Build +run "cd /site && go1.8.1 build -v" + +### Cleanup +run %q[ rm -rf /root/go /site/backend /root/sdk /site/*.go ] +run %q[ apk del git go1.8.1 ] + +cmd "/site/site" + +flatten +tag "xena/christine.website" -- cgit v1.2.3