mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-23 01:33:19 +03:00
Merge pull request #589 from Tzahi12345/better-docker-pr-tests
Better docker PR tests
This commit is contained in:
27
.github/workflows/docker-pr.yml
vendored
Normal file
27
.github/workflows/docker-pr.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: docker-pr
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set hash
|
||||||
|
id: vars
|
||||||
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
|
- name: Get current date
|
||||||
|
id: date
|
||||||
|
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||||
|
- name: create-json
|
||||||
|
id: create-json
|
||||||
|
uses: jsdaniell/create-json@1.1.2
|
||||||
|
with:
|
||||||
|
name: "version.json"
|
||||||
|
json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
|
||||||
|
dir: 'backend/'
|
||||||
|
- name: Build docker images
|
||||||
|
run: docker build . -t tzahi12345/youtubedl-material:nightly-pr
|
||||||
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
uses: jsdaniell/create-json@1.1.2
|
uses: jsdaniell/create-json@1.1.2
|
||||||
with:
|
with:
|
||||||
name: "version.json"
|
name: "version.json"
|
||||||
json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
|
json: '{"type": "docker", "tag": "${{secrets.DOCKERHUB_MASTER_TAG}}", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
|
||||||
dir: 'backend/'
|
dir: 'backend/'
|
||||||
- name: setup platform emulator
|
- name: setup platform emulator
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
@@ -49,4 +49,8 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64,linux/arm,linux/arm64/v8
|
platforms: linux/amd64,linux/arm,linux/arm64/v8
|
||||||
push: true
|
push: true
|
||||||
tags: tzahi12345/youtubedl-material:nightly
|
# Defaults:
|
||||||
|
# DOCKERHUB_USERNAME : tzahi12345
|
||||||
|
# DOCKERHUB_REPO : youtubedl-material
|
||||||
|
# DOCKERHUB_MASTER_TAG: nightly
|
||||||
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:${{secrets.DOCKERHUB_MASTER_TAG}}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
[](https://github.com/Tzahi12345/YoutubeDL-Material/issues)
|
[](https://github.com/Tzahi12345/YoutubeDL-Material/issues)
|
||||||
[](https://github.com/Tzahi12345/YoutubeDL-Material/blob/master/LICENSE.md)
|
[](https://github.com/Tzahi12345/YoutubeDL-Material/blob/master/LICENSE.md)
|
||||||
|
|
||||||
YoutubeDL-Material is a Material Design frontend for [youtube-dl](https://rg3.github.io/youtube-dl/). It's coded using [Angular 11](https://angular.io/) for the frontend, and [Node.js](https://nodejs.org/) on the backend.
|
YoutubeDL-Material is a Material Design frontend for [youtube-dl](https://rg3.github.io/youtube-dl/). It's coded using [Angular 13](https://angular.io/) for the frontend, and [Node.js](https://nodejs.org/) on the backend.
|
||||||
|
|
||||||
Now with [Docker](#Docker) support!
|
Now with [Docker](#Docker) support!
|
||||||
|
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
FROM alpine:3.12 as frontend
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
npm \
|
|
||||||
curl
|
|
||||||
|
|
||||||
RUN npm install -g @angular/cli
|
|
||||||
|
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
RUN curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static .
|
|
||||||
|
|
||||||
COPY [ "package.json", "package-lock.json", "/build/" ]
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
COPY [ "angular.json", "tsconfig.json", "/build/" ]
|
|
||||||
COPY [ "src/", "/build/src/" ]
|
|
||||||
RUN ng build --prod
|
|
||||||
|
|
||||||
#--------------#
|
|
||||||
|
|
||||||
FROM arm32v7/alpine:3.12
|
|
||||||
|
|
||||||
COPY --from=frontend /build/qemu-arm-static /usr/bin
|
|
||||||
|
|
||||||
ENV UID=1000 \
|
|
||||||
GID=1000 \
|
|
||||||
USER=youtube
|
|
||||||
|
|
||||||
RUN addgroup -S $USER -g $GID && adduser -D -S $USER -G $USER -u $UID
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
ffmpeg \
|
|
||||||
npm \
|
|
||||||
python2 \
|
|
||||||
su-exec \
|
|
||||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
|
|
||||||
atomicparsley
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --chown=$UID:$GID [ "backend/package.json", "backend/package-lock.json", "/app/" ]
|
|
||||||
RUN npm install && chown -R $UID:$GID ./
|
|
||||||
|
|
||||||
COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/" ]
|
|
||||||
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
|
||||||
|
|
||||||
EXPOSE 17442
|
|
||||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
|
||||||
CMD [ "node", "app.js" ]
|
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="postsService.config && allowSubscriptions && postsService.subscriptions && postsService.hasPermission('subscriptions')">
|
<ng-container *ngIf="postsService.config && allowSubscriptions && postsService.subscriptions && postsService.hasPermission('subscriptions')">
|
||||||
<mat-divider *ngIf="postsService.subscriptions.length > 0"></mat-divider>
|
<mat-divider *ngIf="postsService.subscriptions.length > 0"></mat-divider>
|
||||||
<a *ngFor="let subscription of postsService.subscriptions" mat-list-item (click)="postsService.sidepanel_mode === 'over' ? sidenav.close() : null" [routerLink]="['/subscription', { id: subscription.id }]"><ngx-avatar [style.margin-right]="'10px'" size="32" [name]="subscription.name"></ngx-avatar>{{subscription.name}}</a>
|
<a *ngFor="let subscription of postsService.subscriptions" mat-list-item (click)="postsService.sidepanel_mode === 'over' ? sidenav.close() : null" [routerLink]="['/subscription', { id: subscription.id }]"><ngx-avatars [style.margin-right]="'10px'" size="32" [name]="subscription.name"></ngx-avatars>{{subscription.name}}</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</mat-nav-list>
|
</mat-nav-list>
|
||||||
</mat-sidenav>
|
</mat-sidenav>
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ export class ConcurrentStreamComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (this.check_timeout) { clearInterval(this.check_timeout); }
|
||||||
|
if (this.update_timeout) { clearInterval(this.update_timeout); }
|
||||||
|
}
|
||||||
|
|
||||||
startServer() {
|
startServer() {
|
||||||
this.started = true;
|
this.started = true;
|
||||||
this.server_started = true;
|
this.server_started = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { AfterViewInit, Component, ElementRef, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
import { Component, ElementRef, Input, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
||||||
import { PostsService } from 'app/posts.services';
|
import { PostsService } from 'app/posts.services';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -6,7 +6,7 @@ import { PostsService } from 'app/posts.services';
|
|||||||
templateUrl: './twitch-chat.component.html',
|
templateUrl: './twitch-chat.component.html',
|
||||||
styleUrls: ['./twitch-chat.component.scss']
|
styleUrls: ['./twitch-chat.component.scss']
|
||||||
})
|
})
|
||||||
export class TwitchChatComponent implements OnInit, AfterViewInit {
|
export class TwitchChatComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
full_chat = null;
|
full_chat = null;
|
||||||
visible_chat = null;
|
visible_chat = null;
|
||||||
@@ -33,7 +33,8 @@ export class TwitchChatComponent implements OnInit, AfterViewInit {
|
|||||||
this.getFullChat();
|
this.getFullChat();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngOnDestroy(): void {
|
||||||
|
if (this.chat_check_interval_obj) { clearInterval(this.chat_check_interval_obj); }
|
||||||
}
|
}
|
||||||
|
|
||||||
private isUserNearBottom(): boolean {
|
private isUserNearBottom(): boolean {
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ export class SubscriptionComponent implements OnInit, OnDestroy {
|
|||||||
this.route.params.subscribe(params => {
|
this.route.params.subscribe(params => {
|
||||||
this.id = params['id'];
|
this.id = params['id'];
|
||||||
|
|
||||||
|
if (this.sub_interval) { clearInterval(this.sub_interval); }
|
||||||
|
|
||||||
this.postsService.service_initialized.subscribe(init => {
|
this.postsService.service_initialized.subscribe(init => {
|
||||||
if (init) {
|
if (init) {
|
||||||
this.getConfig();
|
this.getConfig();
|
||||||
|
|||||||
Reference in New Issue
Block a user