From fd80713ab25cf1cdb8f6cab890a1ee3be343303a Mon Sep 17 00:00:00 2001 From: Guusvanmeerveld Date: Fri, 8 Apr 2022 22:17:35 +0200 Subject: [PATCH] Add README + Netlify config file --- Dockerfile | 1 - README.md | 142 +++++++++++++++++++++++++++++++++++++++++++++++ netlify.toml | 3 + src/svg/logo.svg | 1 + 4 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 netlify.toml create mode 100644 src/svg/logo.svg diff --git a/Dockerfile b/Dockerfile index 87863f4..f3ea2f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,6 @@ ENV NODE_ENV "production" RUN yarn export - FROM nginx:alpine AS runner COPY --from=builder /app/out /usr/share/nginx/html diff --git a/README.md b/README.md index e69de29..c3f7704 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,142 @@ +# MaterialTube + +![Deploy site](https://github.com/Guusvanmeerveld/MaterialTube/actions/workflows/deploy.yml/badge.svg) +![CodeQL](https://github.com/Guusvanmeerveld/MaterialTube/actions/workflows/codeql-analysis.yml/badge.svg) + +![Docker pulls](https://shields.io/docker/pulls/guusvanmeerveld/materialtube) + +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Guusvanmeerveld/MaterialTube) +[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/Guusvanmeerveld/MaterialTube) + + +MaterialTube is a simple client-side only web-client for Invidious servers. It supports using an Invidious account, but also allows you to store all of your data locally. It's main goal is to provide an even greater level of privacy and improve on the current Invidious UI. + +Made using + +![Typescript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white) +![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB) + +## Index +- [MaterialTube](#materialtube) + - [Index](#index) + - [(Current) Features](#current-features) + - [Configuration](#configuration) + - [Deploy](#deploy) + - [Using Node.js](#using-nodejs) + - [Using Docker](#using-docker) + - [Locally](#locally) + - [Using Docker Hub](#using-docker-hub) + - [Using Heroku](#using-heroku) + - [Using Netlify](#using-netlify) + +## (Current) Features +- Browse trending +- Watch video's +- Custom settings + +## Configuration +There are a few environmental variables that are able to be set during build time to further customize the application. + +- GIT_URL: Set the url to the git repo. Default: https://github.com/Guusvanmeerveld/MaterialTube +- APP_NAME: Set the app name to show to the users. Default: MaterialTube +- DEFAULT_SERVER: Set the invidious server to use by default. Default: invidious.privacy.gd + +## Deploy + +### Using Node.js + +Requirements: +- Node.js v16.x +- Yarn or NPM +- Git + +```sh +git clone https://github.com/Guusvanmeerveld/MaterialTube MaterialTube + +cd MaterialTube + +# Choose Yarn or NPM +yarn install --frozen-lockfile + +# npm install --frozen-lockfile + +export NEXT_TELEMETRY_DISABLED=1 +``` + +Now you have to choose between export to static HTML (recommended) or running a custom server (improves speed) + +Exporting to static HTML: +```sh +yarn export + +# npm export +``` +The HTML files can be found in the `out` folder. You can now serve them using something like NGINX or Apache + +You can also opt to use a custom server, which improves on speed because it will prefetch your request. + +Building and starting a custom server: +```sh +yarn build + +# npm build + +yarn start + +# npm start +``` + +### Using Docker + +#### Locally + +Requirements: +- Docker +- docker-compose +- Git + +```sh +git clone https://github.com/Guusvanmeerveld/MaterialTube MaterialTube + +cd MaterialTube + +docker build . -t materialtube +``` + +Now update the `docker-compose.yml` to your needs and start the container: + +```sh +docker-compose up -d +``` + +#### Using Docker Hub + +Requirements: +- Docker +- docker-compose + +Simply update the following to your needs and put it in a file named `docker-compose.yml`. + +```yml +version: "3" + +services: + app: + build: guusvanmeerveld/materialtube + container_name: material-tube + ports: + - 3000:80 +``` + +Now run `docker-compose up -d` to start the container. + +### Using Heroku + +Deploying to Heroku is a very simple and highly recommended way of deploying. All you have to do is click the button below, create an account (if you don't already have one) and deploy it. + +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Guusvanmeerveld/MaterialTube) + +### Using Netlify +Deploying to Netlify is just as easy as deploying to Heroku. Click the button below connect your Git repo and follow the steps to deploy your application. + +[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/Guusvanmeerveld/MaterialTube) \ No newline at end of file diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..1e4cac6 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,3 @@ +[build] + publish = "dist" + command = "yarn export" \ No newline at end of file diff --git a/src/svg/logo.svg b/src/svg/logo.svg new file mode 100644 index 0000000..7608f7c --- /dev/null +++ b/src/svg/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file