mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
- Dockerfile now builds Inbucket inside the container - Add starter inbucket.conf for Docker - Add install.sh to build inbucket inside container - Add customized greeting.html for Docker
34 lines
804 B
Bash
Executable File
34 lines
804 B
Bash
Executable File
#!/bin/sh
|
|
# install.sh
|
|
# description: Build, test, and install Inbucket. Should be executed inside a Docker container.
|
|
|
|
# Note: we assume there are no spaces in dir paths
|
|
installdir=${INBUCKET_HOME}
|
|
srcdir=${INBUCKET_SRC}
|
|
bindir=$installdir/bin
|
|
|
|
# Setup
|
|
export GOBIN=$bindir
|
|
builddate="$(date --iso-8601=seconds)"
|
|
set -e
|
|
cd $srcdir
|
|
go clean
|
|
|
|
# Build
|
|
echo "### Fetching Dependencies"
|
|
go get -d -v ./...
|
|
go get -v github.com/stretchr/testify
|
|
|
|
echo "### Testing Inbucket"
|
|
go test ./...
|
|
|
|
echo "### Building Inbucket"
|
|
mkdir -p $bindir
|
|
go build -o inbucket -race -ldflags "-X main.BUILD_DATE '$builddate'" -v .
|
|
|
|
echo "### Installing Inbucket"
|
|
mv inbucket $bindir
|
|
install etc/docker/inbucket.conf /etc/opt/inbucket.conf
|
|
install etc/docker/greeting.html /etc/opt/inbucket-greeting.html
|
|
cp -r themes $installdir/
|