forked from cadey/xesite
Add docker/boxfiles
This commit is contained in:
parent
9cbb20aea2
commit
bbbfb854c2
|
@ -0,0 +1,4 @@
|
|||
FROM xena/christine.website
|
||||
ENV PORT 5000
|
||||
EXPOSE 5000
|
||||
RUN apk add --no-cache bash
|
|
@ -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"
|
Loading…
Reference in New Issue