misc: Remove dots from folders
This commit is contained in:
parent
7d639b930d
commit
76f8489d37
|
@ -1,17 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright (c) 2018, Transloadit Ltd.
|
|
||||||
# Authors:
|
|
||||||
# - Kevin van Zonneveld <kevin@transloadit.com>
|
|
||||||
|
|
||||||
set -o pipefail
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
# set -o xtrace
|
|
||||||
|
|
||||||
# # Set magic variables for current FILE & DIR
|
|
||||||
# __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
# __file="${__dir}/$(basename "${0}")"
|
|
||||||
# __base="$(basename ${__file})"
|
|
||||||
# __root="$(cd "$(dirname "${__dir}")" && pwd)"
|
|
||||||
|
|
||||||
kubectl exec -it $(kubectl get pods --namespace tus -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') --namespace tus -- /bin/sh
|
|
|
@ -1,82 +0,0 @@
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: tusd
|
|
||||||
namespace: tus
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: tusd
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- image: docker.io/tusproject/tusd:latest
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args: ["-s3-bucket","tusdtest.transloadit.com","-port=8080","-behind-proxy","-max-size=20000000000","-timeout=6000"]
|
|
||||||
name: tusd
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: "1Gi"
|
|
||||||
requests:
|
|
||||||
memory: "1Gi"
|
|
||||||
ports:
|
|
||||||
- name: tusd-web
|
|
||||||
containerPort: 8080
|
|
||||||
envFrom:
|
|
||||||
- secretRef:
|
|
||||||
name: tusd-env
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: tusd
|
|
||||||
namespace: tus
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- name: tusd-web
|
|
||||||
port: 80
|
|
||||||
targetPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
selector:
|
|
||||||
app: tusd
|
|
||||||
---
|
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: tusd
|
|
||||||
namespace: tus
|
|
||||||
annotations:
|
|
||||||
certmanager.k8s.io/cluster-issuer: "letsencrypt-prod"
|
|
||||||
certmanager.k8s.io/acme-challenge-type: "http01"
|
|
||||||
kubernetes.io/tls-acme: "true"
|
|
||||||
kubernetes.io/ingress.class: "nginx"
|
|
||||||
nginx.ingress.kubernetes.io/proxy-body-size: 0m
|
|
||||||
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
|
|
||||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
|
|
||||||
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
|
|
||||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
|
|
||||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
||||||
spec:
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- tusd.tus.io
|
|
||||||
secretName: tusd-tls
|
|
||||||
- hosts:
|
|
||||||
- master.tus.io
|
|
||||||
secretName: master-tls
|
|
||||||
rules:
|
|
||||||
- host: tusd.tus.io
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
backend:
|
|
||||||
serviceName: tusd
|
|
||||||
servicePort: 80
|
|
||||||
- host: master.tus.io
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
backend:
|
|
||||||
serviceName: tusd
|
|
||||||
servicePort: 80
|
|
|
@ -1,24 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
|
|
||||||
source "${__dir}/build_funcs.sh"
|
|
||||||
|
|
||||||
compile linux 386
|
|
||||||
compile linux amd64
|
|
||||||
compile linux arm
|
|
||||||
compile darwin 386
|
|
||||||
compile darwin amd64
|
|
||||||
#compile windows 386 .exe
|
|
||||||
#compile windows amd64 .exe
|
|
||||||
|
|
||||||
maketar linux 386
|
|
||||||
maketar linux amd64
|
|
||||||
maketar linux arm
|
|
||||||
makezip darwin 386
|
|
||||||
makezip darwin amd64
|
|
||||||
#makezip windows 386 .exe
|
|
||||||
#makezip windows amd64 .exe
|
|
||||||
makedep amd64
|
|
|
@ -1,72 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
version="$(git tag -l --points-at HEAD)"
|
|
||||||
commit=$(git log --format="%H" -n 1)
|
|
||||||
|
|
||||||
function compile {
|
|
||||||
local os=$1
|
|
||||||
local arch=$2
|
|
||||||
local ext=$3
|
|
||||||
|
|
||||||
echo "Compiling for $os/$arch..."
|
|
||||||
|
|
||||||
local dir="tusd_${os}_${arch}"
|
|
||||||
rm -rf "$dir"
|
|
||||||
mkdir -p "$dir"
|
|
||||||
GOOS=$os GOARCH=$arch go build \
|
|
||||||
-ldflags="-X github.com/tus/tusd/cmd/tusd/cli.VersionName=${version} -X github.com/tus/tusd/cmd/tusd/cli.GitCommit=${commit} -X 'github.com/tus/tusd/cmd/tusd/cli.BuildDate=$(date --utc)'" \
|
|
||||||
-o "$dir/tusd$ext" ./cmd/tusd/main.go
|
|
||||||
}
|
|
||||||
|
|
||||||
function makezip {
|
|
||||||
local os=$1
|
|
||||||
local arch=$2
|
|
||||||
local ext=$3
|
|
||||||
|
|
||||||
echo "Zipping for $os/$arch..."
|
|
||||||
|
|
||||||
local dir="tusd_${os}_${arch}"
|
|
||||||
zip "$dir.zip" "$dir/tusd$ext" LICENSE.txt README.md
|
|
||||||
}
|
|
||||||
|
|
||||||
function maketar {
|
|
||||||
local os=$1
|
|
||||||
local arch=$2
|
|
||||||
|
|
||||||
echo "Tarring for $os/$arch..."
|
|
||||||
|
|
||||||
local dir="tusd_${os}_${arch}"
|
|
||||||
tar -czf "$dir.tar.gz" "$dir/tusd" LICENSE.txt README.md
|
|
||||||
}
|
|
||||||
|
|
||||||
function makedep {
|
|
||||||
local arch=$1
|
|
||||||
|
|
||||||
echo "Debbing for $arch..."
|
|
||||||
|
|
||||||
local dir="tusd_snapshot_${arch}"
|
|
||||||
rm -rf "$dir"
|
|
||||||
mkdir -p "$dir"
|
|
||||||
mkdir -p "$dir/DEBIAN"
|
|
||||||
mkdir -p "$dir/usr/bin"
|
|
||||||
cp "./tusd_linux_${arch}/tusd" "./$dir/usr/bin/tusd"
|
|
||||||
|
|
||||||
echo "Package: tusd" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Maintainer: Marius <maerious@gmail.com>" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Section: devel" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Priority: optional" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Version: ${version}" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Architecture: ${arch}" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Homepage: https://github.com/tus/tusd" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Built-Using: $(go version)" >> "./$dir/DEBIAN/control"
|
|
||||||
echo "Description: The official server implementation of the tus resumable upload protocol." >> "./$dir/DEBIAN/control"
|
|
||||||
|
|
||||||
dpkg-deb --build "$dir"
|
|
||||||
}
|
|
||||||
|
|
||||||
export -f compile
|
|
||||||
export -f maketar
|
|
||||||
export -f makezip
|
|
||||||
export -f makedep
|
|
|
@ -1,45 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -o pipefail
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
# set -o xtrace
|
|
||||||
|
|
||||||
# Set magic variables for current FILE & DIR
|
|
||||||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
__root="$(cd "$(dirname "${__dir}")" && pwd)"
|
|
||||||
|
|
||||||
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
|
||||||
chmod +x ./kubectl
|
|
||||||
sudo mv ./kubectl /usr/local/bin/kubectl
|
|
||||||
|
|
||||||
#Store the new image in docker hub
|
|
||||||
docker build --quiet -t tusproject/tusd:latest -t tusproject/tusd:$TRAVIS_COMMIT ${__root};
|
|
||||||
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
|
|
||||||
docker push tusproject/tusd:$TRAVIS_COMMIT;
|
|
||||||
docker push tusproject/tusd:latest;
|
|
||||||
|
|
||||||
|
|
||||||
echo "Create directory..."
|
|
||||||
mkdir ${HOME}/.kube
|
|
||||||
echo "Writing KUBECONFIG to file..."
|
|
||||||
echo $KUBECONFIGVAR | python -m base64 -d > ${HOME}/.kube/config
|
|
||||||
echo "KUBECONFIG file written"
|
|
||||||
|
|
||||||
sleep 10s # This cost me some precious debugging time.
|
|
||||||
kubectl apply -f "${__root}/.infra/kube/tusd-kube.yaml"
|
|
||||||
|
|
||||||
|
|
||||||
kubectl set image deployment/tusd --namespace=tus tusd=docker.io/tusproject/tusd:$TRAVIS_COMMIT
|
|
||||||
|
|
||||||
kubectl get pods --namespace=tus
|
|
||||||
kubectl get service --namespace=tus
|
|
||||||
kubectl get deployment --namespace=tus
|
|
||||||
|
|
||||||
|
|
||||||
function cleanup {
|
|
||||||
printf "Cleaning up...\n"
|
|
||||||
rm -f ${HOME}/.kube/config
|
|
||||||
printf "Cleaning done."
|
|
||||||
}
|
|
||||||
|
|
||||||
trap cleanup EXIT
|
|
|
@ -1,54 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#
|
|
||||||
# official-images tag file generator
|
|
||||||
#
|
|
||||||
# usage: ./generate-docker-library.sh > [official-images-folder]/library/tusd
|
|
||||||
#
|
|
||||||
|
|
||||||
cat <<-EOH
|
|
||||||
# This file is generated via https://github.com/tus/tusd/blob/master/generate-docker-library.sh
|
|
||||||
Maintainers: tus.io (@tus), Thomas A. Hirsch (@thirsch)
|
|
||||||
GitRepo: https://github.com/tus/tusd.git
|
|
||||||
EOH
|
|
||||||
|
|
||||||
skipBeforeVersion="0.13.0"
|
|
||||||
previousVersions=();
|
|
||||||
|
|
||||||
function printVersion() {
|
|
||||||
version=( ${1//./ } )
|
|
||||||
majorMinor="${version[0]}.${version[1]}"
|
|
||||||
|
|
||||||
match=$(echo "${previousVersions[@]:0}" | grep -oE "\s?$majorMinor\s?$")
|
|
||||||
previousVersionCount=${#previousVersions[@]}
|
|
||||||
|
|
||||||
# add the majorMinor-Version only, if it is not present yet.
|
|
||||||
if [[ ! -z $match ]] ; then
|
|
||||||
versionString=$1
|
|
||||||
else
|
|
||||||
versionString="$1 $majorMinor"
|
|
||||||
previousVersions+=($majorMinor)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# as the versions are sorted, the very first version gets latest.
|
|
||||||
if [[ ${previousVersionCount} -eq 0 ]]; then
|
|
||||||
versionString="$versionString, latest"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<-EOE
|
|
||||||
|
|
||||||
Tags: $versionString
|
|
||||||
GitCommit: $2
|
|
||||||
EOE
|
|
||||||
}
|
|
||||||
|
|
||||||
for version in `git tag -l --sort=-v:refname | grep "^[0-9.]\+$"`; do
|
|
||||||
commit=`git rev-parse ${version}`
|
|
||||||
|
|
||||||
# no official release before this version
|
|
||||||
if [[ ${version} = ${skipBeforeVersion} ]] ; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
printVersion "${version}" ${commit}
|
|
||||||
done
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
install_etcd_pkgs() {
|
|
||||||
ETCD_VERSION="3.3.10"
|
|
||||||
wget -q -O /tmp/etcd.tar.gz "https://github.com/etcd-io/etcd/releases/download/v$ETCD_VERSION/etcd-v$ETCD_VERSION-linux-amd64.tar.gz"
|
|
||||||
tar xvzf /tmp/etcd.tar.gz -C /tmp
|
|
||||||
export PATH="$PATH:/tmp/etcd-v$ETCD_VERSION-linux-amd64"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install the etcd binary which is not vendored.
|
|
||||||
install_etcd_pkgs
|
|
||||||
|
|
||||||
go test ./pkg/...
|
|
||||||
go vet ./pkg/...
|
|
|
@ -19,9 +19,9 @@ env:
|
||||||
install:
|
install:
|
||||||
- true
|
- true
|
||||||
script:
|
script:
|
||||||
- ./.scripts/test_all.sh
|
- ./scripts/test_all.sh
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- if [[ "$TRAVIS_TAG" != "" ]]; then ./.scripts/build_all.sh; fi
|
- if [[ "$TRAVIS_TAG" != "" ]]; then ./scripts/build_all.sh; fi
|
||||||
deploy:
|
deploy:
|
||||||
- provider: releases
|
- provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
|
@ -35,7 +35,7 @@ deploy:
|
||||||
repo: tus/tusd
|
repo: tus/tusd
|
||||||
os: linux
|
os: linux
|
||||||
- provider: script
|
- provider: script
|
||||||
script: .scripts/deploy_kube.sh
|
script: scripts/deploy_kube.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
go: 1.12
|
go: 1.12
|
||||||
|
|
|
@ -249,7 +249,7 @@ go test -v ./...
|
||||||
|
|
||||||
### How can I access tusd using HTTPS?
|
### How can I access tusd using HTTPS?
|
||||||
|
|
||||||
The tusd binary, once executed, listens on the provided port for only non-encrypted HTTP requests and *does not accept* HTTPS connections. This decision has been made to limit the functionality inside this repository which has to be developed, tested and maintained. If you want to send requests to tusd in a secure fashion - what we absolutely encourage, we recommend you to utilize a reverse proxy in front of tusd which accepts incoming HTTPS connections and forwards them to tusd using plain HTTP. More information about this topic, including sample configurations for Nginx and Apache, can be found in [issue #86](https://github.com/tus/tusd/issues/86#issuecomment-269569077) and in the [Apache example configuration](/docs/apache2.conf).
|
The tusd binary, once executed, listens on the provided port for only non-encrypted HTTP requests and *does not accept* HTTPS connections. This decision has been made to limit the functionality inside this repository which has to be developed, tested and maintained. If you want to send requests to tusd in a secure fashion - what we absolutely encourage, we recommend you to utilize a reverse proxy in front of tusd which accepts incoming HTTPS connections and forwards them to tusd using plain HTTP. More information about this topic, including sample configurations for Nginx and Apache, can be found in [issue #86](https://github.com/tus/tusd/issues/86#issuecomment-269569077) and in the [Apache example configuration](/examples/apache2.conf).
|
||||||
|
|
||||||
### Can I run tusd behind a reverse proxy?
|
### Can I run tusd behind a reverse proxy?
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ Yes, it is absolutely possible to do so. Firstly, you should execute the tusd bi
|
||||||
|
|
||||||
- *Forward hostname and scheme.* If the proxy rewrites the request URL, the tusd server does not know the original URL which was used to reach the proxy. This behavior can lead to situations, where tusd returns a redirect to a URL which can not be reached by the client. To avoid this confusion, you can explicitly tell tusd which hostname and scheme to use by supplying the `X-Forwarded-Host` and `X-Forwarded-Proto` headers.
|
- *Forward hostname and scheme.* If the proxy rewrites the request URL, the tusd server does not know the original URL which was used to reach the proxy. This behavior can lead to situations, where tusd returns a redirect to a URL which can not be reached by the client. To avoid this confusion, you can explicitly tell tusd which hostname and scheme to use by supplying the `X-Forwarded-Host` and `X-Forwarded-Proto` headers.
|
||||||
|
|
||||||
Explicit examples for the above points can be found in the [Nginx configuration](/docs/nginx.conf) which is used to power the [master.tus.io](https://master.tus.io) instace.
|
Explicit examples for the above points can be found in the [Nginx configuration](/examples/nginx.conf) which is used to power the [master.tus.io](https://master.tus.io) instace.
|
||||||
|
|
||||||
### Can I run custom verification/authentication checks before an upload begins?
|
### Can I run custom verification/authentication checks before an upload begins?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue