mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-04 14:41:59 +00:00 
			
		
		
		
	Update setup instructions
This commit is contained in:
		
							
								
								
									
										40
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								README.md
									
									
									
									
									
								
							@@ -1,18 +1,46 @@
 | 
			
		||||
# Invidious
 | 
			
		||||
 | 
			
		||||
Alternative frontend for YouTube
 | 
			
		||||
> Invidious is a web application that indexes popular video sites
 | 
			
		||||
 | 
			
		||||
## Installation
 | 
			
		||||
 | 
			
		||||
### Installing [Crystal](https://github.com/crystal-lang/crystal):
 | 
			
		||||
 | 
			
		||||
On Arch:
 | 
			
		||||
```bash
 | 
			
		||||
pacman -Syu shards crystal
 | 
			
		||||
crystal deps
 | 
			
		||||
$ sudo pacman -Syu shards crystal
 | 
			
		||||
$ crystal deps
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
On OSX:
 | 
			
		||||
```bash
 | 
			
		||||
crystal deps
 | 
			
		||||
./sentry
 | 
			
		||||
$ brew update
 | 
			
		||||
$ brew install shards crystal-lang
 | 
			
		||||
$ crystal deps
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Installing Postgres:
 | 
			
		||||
 | 
			
		||||
Onn Arch:
 | 
			
		||||
Install according to the [wiki](https://wiki.archlinux.org/index.php/PostgreSQL), then setup database with:
 | 
			
		||||
```bash
 | 
			
		||||
$ ./setup.sh
 | 
			
		||||
```
 | 
			
		||||
On OSX:
 | 
			
		||||
```bash
 | 
			
		||||
$ brew install postgres
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Usage:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ crystal src/invidious.cr
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Or for development:
 | 
			
		||||
```bash
 | 
			
		||||
$ curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/install.cr | crystal eval
 | 
			
		||||
$ ./sentry
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Contributing
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								setup.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								setup.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
dropdb invidious
 | 
			
		||||
createdb invidious
 | 
			
		||||
 | 
			
		||||
psql invidious < videos.sql
 | 
			
		||||
							
								
								
									
										14
									
								
								videos.sql
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								videos.sql
									
									
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
-- Table: public.videos
 | 
			
		||||
 | 
			
		||||
-- DROP TABLE public.videos;
 | 
			
		||||
DROP TABLE videos;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE public.videos
 | 
			
		||||
(
 | 
			
		||||
@@ -8,6 +8,11 @@ CREATE TABLE public.videos
 | 
			
		||||
    info text COLLATE pg_catalog."default",
 | 
			
		||||
    html text COLLATE pg_catalog."default",
 | 
			
		||||
    updated timestamp with time zone,
 | 
			
		||||
    title text COLLATE pg_catalog."default",
 | 
			
		||||
    views bigint,
 | 
			
		||||
    likes integer,
 | 
			
		||||
    dislikes integer,
 | 
			
		||||
    wilson_score double precision,
 | 
			
		||||
    CONSTRAINT videos_pkey PRIMARY KEY (id)
 | 
			
		||||
)
 | 
			
		||||
WITH (
 | 
			
		||||
@@ -15,17 +20,10 @@ WITH (
 | 
			
		||||
)
 | 
			
		||||
TABLESPACE pg_default;
 | 
			
		||||
 | 
			
		||||
ALTER TABLE public.videos
 | 
			
		||||
    OWNER to omar;
 | 
			
		||||
 | 
			
		||||
GRANT ALL ON TABLE public.videos TO kemal;
 | 
			
		||||
 | 
			
		||||
GRANT ALL ON TABLE public.videos TO omar;
 | 
			
		||||
 | 
			
		||||
-- Index: id_idx
 | 
			
		||||
 | 
			
		||||
-- DROP INDEX public.id_idx;
 | 
			
		||||
 | 
			
		||||
CREATE UNIQUE INDEX id_idx
 | 
			
		||||
    ON public.videos USING btree
 | 
			
		||||
    (id COLLATE pg_catalog."default")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user