Fix logging level, improved README.md
This commit is contained in:
parent
cef5d1c3d6
commit
62d3df0725
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
flixtorrentz-api.iml
|
||||
build
|
||||
.DS_Store
|
||||
.torrent.bolt.db
|
@ -2,10 +2,10 @@
|
||||
FROM golang:alpine as builder
|
||||
|
||||
RUN apk add --no-cache git ca-certificates && \
|
||||
mkdir -p $GOPATH/src/git.adphi.net/Adphi/SERVICE_NAME && \
|
||||
mkdir -p $GOPATH/src/git.adphi.net/Adphi/ytsflix && \
|
||||
mkdir /build
|
||||
|
||||
WORKDIR $GOPATH/src/git.adphi.net/Adphi/SERVICE_NAME
|
||||
WORKDIR $GOPATH/src/git.adphi.net/Adphi/ytsflix
|
||||
ADD . .
|
||||
|
||||
RUN go get -u github.com/gobuffalo/packr/... && \
|
||||
@ -21,6 +21,9 @@ COPY --from=builder /build/* /bin/
|
||||
|
||||
ENV LOG_LEVEL=INFO
|
||||
ENV DATA_DIR=/downloads
|
||||
|
||||
VOLUME /download
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["ytsflix"]
|
24
README.md
24
README.md
@ -0,0 +1,24 @@
|
||||
# YTSFlix (WIP)
|
||||
|
||||
YTSFlix is web app that allow you to browse YTS.am content,
|
||||
watch trailers and stream Torrent with available subtitles.
|
||||
|
||||
![Home](images/home.png)
|
||||
![Movie](images/movie.png)
|
||||
|
||||
## Install with Docker
|
||||
```bash
|
||||
docker pull adphi/ytsflix
|
||||
docker run -d --name ytsflix -v ytsflix:/downloads -e LOG_LEVEL=DEBUG -p 8080:8080 adphi/ytsflix
|
||||
```
|
||||
The app will be available at [http://localhost:8080](http://localhost:8080)
|
||||
|
||||
## Build
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
## Run tests
|
||||
```bash
|
||||
make tests
|
||||
```
|
@ -11,10 +11,11 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
var storagePath = "./"
|
||||
var storagePath = "/tmp"
|
||||
if os.Getenv("DATA_DIR") != "" {
|
||||
storagePath = os.Getenv("DATA_DIR")
|
||||
}
|
||||
logrus.Infof("Using directory: %s", storagePath)
|
||||
setupLogging()
|
||||
h, err := handler.NewHandler(storagePath)
|
||||
if err != nil {
|
||||
@ -38,10 +39,11 @@ func setupLogging() {
|
||||
level := os.Getenv("LOG_LEVEL")
|
||||
l := logrus.ErrorLevel
|
||||
for _, ll := range logrus.AllLevels {
|
||||
if strings.ToUpper(level) == string(ll) {
|
||||
if strings.ToLower(level) == ll.String() {
|
||||
l = ll
|
||||
break
|
||||
}
|
||||
}
|
||||
logrus.SetLevel(l)
|
||||
logrus.Infof("Setting LOG_LEVEL: %s", l)
|
||||
}
|
||||
|
BIN
images/home.png
Normal file
BIN
images/home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 MiB |
BIN
images/movie.png
Normal file
BIN
images/movie.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 MiB |
@ -15,6 +15,7 @@
|
||||
width: 100%;
|
||||
}
|
||||
.section {
|
||||
padding: 0px 10px 0px 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
@ -125,7 +126,7 @@
|
||||
transform: translate3d(-10.724999999999994px, 0, 0);
|
||||
}
|
||||
.row__inner:hover .tile {
|
||||
opacity: 0.3;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.row__inner:hover .tile:hover {
|
||||
-webkit-transform: scale(1.15);
|
||||
|
2
vendor/vendor.json
vendored
2
vendor/vendor.json
vendored
@ -556,5 +556,5 @@
|
||||
"revisionTime": "2017-12-12T22:16:18Z"
|
||||
}
|
||||
],
|
||||
"rootPath": "git.adphi.net/Adphi/flixtorrentz-api"
|
||||
"rootPath": "git.adphi.net/Adphi/ytsflix"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user