mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
Move compose to top level
Comment out broken scrapers Remove db init scripts and use ENABLE_SYNC env var which the code base uses to specify if Sequelize should create or alter tables on startup, meaning we dont need manual db initialization. There were missing tables anyhow :P
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
restart: always
|
||||
image: docker.io/bitnami/mongodb:7.0
|
||||
ports:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
- 'mongodb_data:/bitnami/mongodb'
|
||||
scraper:
|
||||
build: ../../scraper/
|
||||
restart: always
|
||||
ports:
|
||||
- "7001:7001"
|
||||
environment:
|
||||
- PORT=7001
|
||||
- MONGODB_URI=mongodb://mongodb:27017/torrentio
|
||||
- DATABASE_URI=postgres://postgres@postgres:5432/torrentio
|
||||
torrentio:
|
||||
build: ../
|
||||
restart: always
|
||||
ports:
|
||||
- "7000:7000"
|
||||
environment:
|
||||
- MONGODB_URI=mongodb://mongodb:27017/torrentio
|
||||
- DATABASE_URI=postgres://postgres@postgres:5432/torrentio
|
||||
postgres:
|
||||
image: postgres:14-alpine
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
- './init:/docker-entrypoint-initdb.d'
|
||||
environment:
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_DB=torrentio
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
driver: local
|
||||
pg_data:
|
||||
driver: local
|
||||
@@ -1,53 +0,0 @@
|
||||
CREATE TABLE "torrents" (
|
||||
"infoHash" varchar(64) PRIMARY KEY,
|
||||
"provider" varchar(32) NOT NULL,
|
||||
"torrentId" varchar(128),
|
||||
"title" varchar(256) NOT NULL,
|
||||
"size" bigint,
|
||||
"type" varchar(16) NOT NULL,
|
||||
"uploadDate" date NOT NULL,
|
||||
"seeders" integer,
|
||||
"trackers" varchar(4096),
|
||||
"languages" varchar(4096),
|
||||
"resolution" varchar(16),
|
||||
"createdAt" date,
|
||||
"updatedAt" date,
|
||||
"reviewed" boolean,
|
||||
"opened" boolean
|
||||
);
|
||||
|
||||
CREATE TABLE "files" (
|
||||
"id" SERIAL PRIMARY KEY,
|
||||
"infoHash" varchar(64) NOT NULL,
|
||||
"fileIndex" integer,
|
||||
"title" varchar(256) NOT NULL,
|
||||
"size" bigint,
|
||||
"imdbId" varchar(32),
|
||||
"imdbSeason" integer,
|
||||
"imdbEpisode" integer,
|
||||
"kitsuId" integer,
|
||||
"kitsuEpisode" integer,
|
||||
"createdAt" date,
|
||||
"updatedAt" date,
|
||||
FOREIGN KEY("infoHash") REFERENCES torrents("infoHash") ON DELETE CASCADE,
|
||||
UNIQUE("infoHash","fileIndex")
|
||||
);
|
||||
|
||||
CREATE TABLE "subtitles" (
|
||||
"id" SERIAL PRIMARY KEY,
|
||||
"infoHash" varchar(64) NOT NULL,
|
||||
"fileIndex" integer NOT NULL,
|
||||
"fileId" bigint,
|
||||
"title" varchar(512) NOT NULL,
|
||||
"size" bigint,
|
||||
FOREIGN KEY("infoHash") REFERENCES torrents("infoHash") ON DELETE CASCADE,
|
||||
FOREIGN KEY("fileId") REFERENCES files("id") ON DELETE SET NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "contents" (
|
||||
"infoHash" varchar(64),
|
||||
"fileIndex" integer,
|
||||
"path" varchar(256),
|
||||
"size" bigint,
|
||||
FOREIGN KEY("infoHash") REFERENCES torrents("infoHash") ON DELETE CASCADE
|
||||
);
|
||||
Reference in New Issue
Block a user