mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-25 13:39:22 +00:00
Merge 14d1bd1fc30ad5bc7a52f08d751f9a9a499e55ab into 9d5b8d99f7237df8668f553611d2e5e53359da4f
This commit is contained in:
commit
b6f7f903d0
65
.github/workflows/build-docker-image
vendored
65
.github/workflows/build-docker-image
vendored
@ -1,38 +1,47 @@
|
||||
name: Publish Docker Image
|
||||
name: Build Yarr Docker image
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags: [ 'v*.*.*', 'v*.*', 'v*', 'latest' ]
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: nkanaev/yarr
|
||||
paths:
|
||||
- 'yarr-version.txt'
|
||||
jobs:
|
||||
build-and-push-image:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
-
|
||||
name: Read latest release tag
|
||||
id: read-tag
|
||||
run: |
|
||||
echo ::set-output name=tag::$(curl -sL https://raw.githubusercontent.com/rebron1900/yarr/main/yarr-version.txt)
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||
repository: 'rebron1900/yarr'
|
||||
ref: ${{ steps.read-tag.outputs.tag }}
|
||||
-
|
||||
name: Remove GOARCH
|
||||
run: |
|
||||
sed -i -e 's/GOARCH=amd64//g' makefile
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
-
|
||||
name: Push to Docker
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./etc/dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: |
|
||||
${{ secrets.DOCKER_USERNAME }}/yarr:latest
|
||||
${{ secrets.DOCKER_USERNAME }}/yarr:${{ steps.read-tag.outputs.tag }}
|
||||
|
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@ -142,3 +142,38 @@ jobs:
|
||||
asset_path: ./yarr-linux.zip
|
||||
asset_name: yarr-${{ github.ref }}-linux64.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
build_docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [create_release]
|
||||
steps:
|
||||
- name: Read latest release tag
|
||||
id: read-tag
|
||||
run: |
|
||||
echo ::set-output name=tag::$(curl -sL https://raw.githubusercontent.com/rebron1900/yarr/master/yarr-version.txt)
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'rebron1900/yarr'
|
||||
ref: ${{ steps.read-tag.outputs.tag }}
|
||||
- name: Remove GOARCH
|
||||
run: |
|
||||
sed -i -e 's/GOARCH=amd64//g' makefile
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Push to Docker
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_USERNAME }}/yarr:latest
|
||||
${{ secrets.DOCKER_USERNAME }}/yarr:${{ steps.read-tag.outputs.tag }}
|
||||
|
2
makefile
2
makefile
@ -1,4 +1,4 @@
|
||||
VERSION=2.4
|
||||
VERSION=2.5
|
||||
GITHASH=$(shell git rev-parse --short=8 HEAD)
|
||||
|
||||
CGO_ENABLED=1
|
||||
|
68
readme.md
68
readme.md
@ -12,6 +12,29 @@ The app is a single binary with an embedded database (SQLite).
|
||||
The latest prebuilt binaries for Linux/MacOS/Windows AMD64 are available
|
||||
[here](https://github.com/nkanaev/yarr/releases/latest). Installation instructions:
|
||||
|
||||
* Command Arges
|
||||
|
||||
```
|
||||
-addr string
|
||||
address to run server on (default "127.0.0.1:7070")
|
||||
-auth-file path
|
||||
path to a file containing username:password
|
||||
-base string
|
||||
base path of the service url
|
||||
-cert-file path
|
||||
path to cert file for https
|
||||
-db path
|
||||
storage file path
|
||||
-key-file path
|
||||
path to key file for https
|
||||
-log-file path
|
||||
path to log file to use instead of stdout
|
||||
-open
|
||||
open the server in browser
|
||||
-version
|
||||
print application version
|
||||
```
|
||||
|
||||
* MacOS
|
||||
|
||||
Download `yarr-*-macos64.zip`, unzip it, place `yarr.app` in `/Applications` folder, [open the app][macos-open], click the anchor menu bar icon, select "Open".
|
||||
@ -27,9 +50,50 @@ and run [the script](etc/install-linux.sh).
|
||||
|
||||
[macos-open]: https://support.apple.com/en-gb/guide/mac-help/mh40616/mac
|
||||
|
||||
For self-hosting, see `yarr -h` for auth, tls & server configuration flags.
|
||||
* Docker environment
|
||||
|
||||
See more:
|
||||
You can use docker or docker-compose to run yarr, and you can also use environment variables to configure startup parameters.
|
||||
|
||||
- `YARR_ADDR` :address to run server on (default "127.0.0.1:7070")
|
||||
- `YARR_BASE` :base path of the service url
|
||||
- `YARR_AUTHFILE` :path to a file containing username:password
|
||||
- `YARR_CERTFILE` :path to cert file for https
|
||||
- `YARR_KEYFILE` :path to key file for https
|
||||
- `YARR_DB` :storage file path
|
||||
- `YARR_LOGFILE` :path to log file to use instead of stdout
|
||||
|
||||
* Docker run:
|
||||
```
|
||||
docker run -d \
|
||||
--name yarr \
|
||||
-p 25255:7070 \
|
||||
-e YARR_AUTHFILE="/data/.auth.list" \
|
||||
-v /data/yarr-data:/data \
|
||||
--restart always \
|
||||
arsfeld/yarr:latest
|
||||
```
|
||||
|
||||
* Docker-Compose Run
|
||||
|
||||
Create a file named `.auth.list` under the `/data/` directory, and the content format should be: `username:password`.
|
||||
Then start by running docker-compose up -d and enjoy!
|
||||
|
||||
```yaml
|
||||
version: '3.3'
|
||||
services:
|
||||
yarr:
|
||||
container_name: yarr
|
||||
image: 'arsfeld/yarr:latest'
|
||||
restart: always
|
||||
ports:
|
||||
- '25255:7070'
|
||||
environment:
|
||||
YARR_AUTHFILE: "/data/.auth.list"
|
||||
volumes:
|
||||
- '/data/yarr-data:/data'
|
||||
```
|
||||
|
||||
* See more:
|
||||
|
||||
* [Building from source code](doc/build.md)
|
||||
* [Fever API support](doc/fever.md)
|
||||
|
@ -358,7 +358,7 @@
|
||||
<p class="cursor-default"><b>New Feed</b></p>
|
||||
<form action="" @submit.prevent="createFeed(event)" class="mt-4">
|
||||
<label for="feed-url">URL</label>
|
||||
<input id="feed-url" name="url" type="url" class="form-control" required autocomplete="off" :readonly="feedNewChoice.length > 0" placeholder="https://example.com/feed" v-focus>
|
||||
<input id="feed-url" name="url" type="url" class="form-control" required autocomplete="off" :readonly="feedNewChoice.length > 0" placeholder="https://example.com/feed" v-focus V-model="autoFeedUrl">
|
||||
<label for="feed-folder" class="mt-3 d-block">
|
||||
Folder
|
||||
<a href="#" class="float-right text-decoration-none" @click.prevent="createNewFeedFolder()">new folder</a>
|
||||
|
@ -183,6 +183,14 @@ Vue.component('relative-time', {
|
||||
})
|
||||
|
||||
var vm = new Vue({
|
||||
mounted:function(){
|
||||
const subscribe_to = new URLSearchParams(window.location.search).get('subscribe_to');
|
||||
if(subscribe_to){
|
||||
vm.settings = 'create'
|
||||
//document.getElementById("feed-url").value = subscribe_to;
|
||||
this.autoFeedUrl = subscribe_to;
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
this.refreshStats()
|
||||
.then(this.refreshFeeds.bind(this))
|
||||
@ -676,6 +684,7 @@ var vm = new Vue({
|
||||
this.filteredTotalStats = statsTotal
|
||||
},
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
vm.$mount('#app')
|
||||
|
@ -525,6 +525,46 @@ a,
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/* Beautify the scroll bar. */
|
||||
:root {
|
||||
--custom-thumb-color: #6c757d;
|
||||
--custom-track-color: rgba(0, 0, 0, 0);
|
||||
--custom-width: thin;
|
||||
--custom-thumb-color-hover: #ef4c4c;
|
||||
--custom-track-color-hover: rgba(0, 0, 0, 0);
|
||||
--webkit-scrollbar-width-height: 7px;
|
||||
--webkit-scrollbar-border-radius: 6px;
|
||||
--workaround-gh-scrollbars: 0;
|
||||
}
|
||||
*:not(select) {
|
||||
scrollbar-color: var(--custom-thumb-color) var(--custom-track-color) !important;
|
||||
scrollbar-width: var(--custom-width) !important;
|
||||
}
|
||||
/* Chrome and derivatives*/
|
||||
::-webkit-scrollbar {
|
||||
max-width: var(--webkit-scrollbar-width-height) !important;
|
||||
max-height: var(--webkit-scrollbar-width-height) !important;
|
||||
background: var(--custom-track-color) !important;
|
||||
}
|
||||
::-webkit-scrollbar-corner,
|
||||
::-webkit-scrollbar-track,
|
||||
::-webkit-scrollbar-track-piece {
|
||||
background: var(--custom-track-color) !important;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--custom-thumb-color) !important;
|
||||
border-radius: var(--webkit-scrollbar-border-radius) !important;
|
||||
}
|
||||
::-webkit-scrollbar-corner:hover,
|
||||
::-webkit-scrollbar-track:hover,
|
||||
::-webkit-scrollbar-track-piece:hover {
|
||||
background: var(--custom-track-color-hover) !important;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--custom-thumb-color-hover) !important;
|
||||
}
|
||||
|
||||
|
||||
/* responsive layout
|
||||
|
||||
tablet:
|
||||
|
1
yarr-version.txt
Normal file
1
yarr-version.txt
Normal file
@ -0,0 +1 @@
|
||||
v2.5
|
Loading…
x
Reference in New Issue
Block a user