-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add traefik with required libraries and build from source #54
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
traefik* |
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,11 @@ | ||||||||||||
# Build Script | ||||||||||||
|
||||||||||||
This build script downloads the latest version of traefik form the | ||||||||||||
corresponding github releases page. To modify the installation version change | ||||||||||||
the `version` variable in the `build.sh`. | ||||||||||||
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Use one line per sentence and one sentence per line. |
||||||||||||
|
||||||||||||
# Requirements | ||||||||||||
|
||||||||||||
*Not installed by the build script.* | ||||||||||||
|
||||||||||||
* golang: 1.20.6 | ||||||||||||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the installation instructions here (don't go into details, you can just point to a link where people can find instructions). |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,49 @@ | ||||||
#!/bin/bash | ||||||
|
||||||
version=v2.10.3 | ||||||
name=traefik | ||||||
appname=${name}-${version} | ||||||
tarball=${appname}.src.tar.gz | ||||||
|
||||||
extract=../extract.sh | ||||||
|
||||||
echo "Cleaning artefacts ..." | ||||||
rm -rf ${tarball} ${appname} ${name} | ||||||
|
||||||
echo -n "Downloading ${tarball} ... " | ||||||
wget -q https://github.com/traefik/traefik/releases/download/${version}/${tarball} | ||||||
echo "" | ||||||
|
||||||
echo -n "Unpacking traefik ... " | ||||||
mkdir -p ./$appname | ||||||
tar xzf $tarball -C ./$appname | ||||||
echo "" | ||||||
|
||||||
echo -n "Setting up GO env ... " | ||||||
export GOPATH=~/go | ||||||
export PATH=$PATH:$GOPATH/bin | ||||||
echo "" | ||||||
|
||||||
echo -n "Building traefik ... " | ||||||
make clean-webui -C ${appname} | ||||||
echo "" | ||||||
|
||||||
pushd ${appname} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
echo "${appname}: Running GO get ..." | ||||||
go get && | ||||||
go mod tidy && | ||||||
go generate && | ||||||
go build -ldflags "-linkmode 'external' -extldflags '-pie'" -buildmode=pie \ | ||||||
./cmd/traefik | ||||||
|
||||||
popd +0 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
if test -f ${appname}/${name}; then | ||||||
ln -s ${appname}/${name} ./${name} | ||||||
fi | ||||||
|
||||||
echo "Extracting dependencies ..." | ||||||
$extract ./${name} | ||||||
|
||||||
echo "Done" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra empty line