diff options
| author | Christine Dodrill <me@christine.website> | 2017-05-20 15:56:34 -0700 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2017-05-20 15:56:34 -0700 |
| commit | bbbfb854c22f5baab4a6f7a431d7593f91c0c91f (patch) | |
| tree | 203d0af82701193df9c410906d602d9b88e196f8 | |
| parent | 9cbb20aea2d6b1979a47af9956dbcc8dbe2a2e08 (diff) | |
| download | xesite-bbbfb854c22f5baab4a6f7a431d7593f91c0c91f.tar.xz xesite-bbbfb854c22f5baab4a6f7a431d7593f91c0c91f.zip | |
Add docker/boxfiles
| -rw-r--r-- | Dockerfile | 4 | ||||
| -rw-r--r-- | box.rb | 47 |
2 files changed, 51 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7acc9cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM xena/christine.website +ENV PORT 5000 +EXPOSE 5000 +RUN apk add --no-cache bash
\ No newline at end of file @@ -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" |
