Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #59 from dgonyeo/examples
Browse files Browse the repository at this point in the history
examples: Added example build scripts for acserver and nginx
  • Loading branch information
Derek Gonyeo committed Oct 23, 2015
2 parents c8603be + 77a6fab commit 4391f8d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/build-acserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e

echo "Building acserver..."
CGO_ENABLED=0 GOOS=linux go build -o acserver -a -tags netgo -ldflags '-w' github.com/appc/acserver

acbuild --debug begin

trap "{ export EXT=$?; acbuild --debug end && exit $EXT; }" EXIT

acbuild --debug set-name example.com/acserver
acbuild --debug copy acserver /bin/acserver
acbuild --debug copy $GOPATH/src/github.com/appc/acserver/templates /templates
acbuild --debug set-exec /bin/acserver
acbuild --debug port add http tcp 3001
acbuild --debug mount add acis /acis
acbuild --debug label add arch amd64
acbuild --debug label add os linux
acbuild --debug write --overwrite acserver-latest-linux-amd64.aci

rm acserver
16 changes: 16 additions & 0 deletions examples/build-nginx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e

acbuild --debug begin quay.io/listhub/alpine

trap "{ export EXT=$?; acbuild --debug end && exit $EXT; }" EXIT

acbuild --debug set-name example.com/nginx
acbuild --debug run apk update
acbuild --debug run apk add nginx
acbuild --debug set-exec -- /usr/sbin/nginx -g "daemon off;"
acbuild --debug port add http tcp 80
acbuild --debug mount add html /usr/share/nginx/html
acbuild --debug label add arch amd64
acbuild --debug label add os linux
acbuild --debug write --overwrite nginx-latest-linux-amd64.aci

0 comments on commit 4391f8d

Please sign in to comment.