You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ Contributions to sqtracker are welcome. Trackers are often forked and modified,
4
4
5
5
## Code style
6
6
7
-
Please follow existing conventions in code style. If you PR any messy, redundant or hard to understand code I will request changes on your PR.
7
+
Please follow existing conventions in code style. If you PR any messy, redundant or hard to understand code then expect changes to be requested on your PR.
8
8
9
9
### Linting
10
10
11
-
All contributions **must** be linted with the existing `yarn lint` command. Better yet, use an editor or IDE that runs the linting for you, such as WebStorm. This will keep code style mostly consistent. Any un-linted PRs will have changes requested before I even review them.
11
+
All contributions **must** be linted with the existing `yarn lint` command. Better yet, use an editor or IDE that runs the linting for you, such as WebStorm. This will keep code style mostly consistent.
* Searching torrents or browsing by category or tags
17
18
* Freeleech options (specific torrents, sitewide)
18
-
* Upload/download tracking
19
-
* Track how much content each user has uploaded/downloaded
19
+
* Torrent grouping (e.g. different formats of same movie)
20
+
* Bookmarks
21
+
* Upload / download tracking
22
+
* Track how much content each user has uploaded / downloaded
20
23
* Track ratios
21
-
* Limit up/downloading per user based on ratio
24
+
* Limit up / downloading per user based on ratio
22
25
* Award invites based on ratio
23
26
* User interaction
24
27
* Commenting on torrents
25
-
* Up/down voting torrents
28
+
* Up / down voting torrents
26
29
* Requests system
27
30
* Moderation
28
-
* Staff/admin privileges
31
+
* Staff / admin privileges
29
32
* Reporting torrents to be reviewed by staff
30
33
* Detailed stats available to admins
31
-
* Announcements/news posts (for posting of tracker rules, important updates etc.)
32
-
* Ban/unban users
34
+
* Wiki system
35
+
* Announcements / news posts
36
+
* Ban / unban users
37
+
* Tracker appearance
38
+
* Configurable theme / CSS
33
39
34
40
## Deploying
35
41
36
42
### Components
37
43
38
44
An sqtracker deployment is made up of 4 separate components. These are:
39
45
40
-
#### A MongoDB database
41
-
42
-
[MongoDB](https://www.mongodb.com/) is a popular and powerful document-oriented database. Version 5.2 or higher is required.
43
-
44
-
#### The sqtracker API service
46
+
#### 1. The sqtracker API service
45
47
46
48
The sqtracker API service handles all actions taken by users (authentication, uploads, searching etc.), implements the BitTorrent tracker specification to handle announces and scrapes, and provides the RSS feed.
47
49
48
-
#### The sqtracker client service
50
+
#### 2. The sqtracker client service
49
51
50
52
The sqtracker client service provides the modern, responsive web interface that users interact with.
51
53
52
-
#### A HTTP proxy server
54
+
#### 3. A MongoDB database
55
+
56
+
[MongoDB](https://www.mongodb.com/) is a popular and powerful document-oriented database. Version 5.2 or higher is required.
57
+
58
+
#### 4. A HTTP proxy server
53
59
54
60
The HTTP proxy allows the client, API, and BitTorrent tracker to all be accessible via a single endpoint.
55
61
56
62
### Deploying with Docker compose
57
63
58
64
The sqtracker platform is designed to be deployed via Docker. Once a configuration file is created, deploying is as simple as running `docker compose up -d` at the root of the project.
59
65
66
+
If you change the name of any services in `docker-compose.yml`, you will also need to update the relevant host names in your `config.js` and `traefik.yml` files.
67
+
68
+
sqtracker is reasonably light-weight, but you should still invest in a VPS with decent resources if you want to run a fast and performant tracker.
69
+
70
+
### Deploying with a PaaS platform
71
+
60
72
Alternatively, you can deploy each service individually on a PaaS cloud platform such as [Northflank](https://northflank.com).
61
73
62
-
If you change the name of any services in `docker-compose.yml`, you will also need to update the relevant host names in your `config.js` and `traefik.yml` files.
74
+
You will need to deploy each of the 4 components listed above. The Docker images for the client and API services are published in this repository.
63
75
64
76
## Configuration
65
77
66
78
All configuration is provided via a single JavaScript file named `config.js`. This file must export an object containing 2 keys: `envs` and `secrets`.
67
79
68
-
A full list of configuration options is below. All are required.
80
+
An example configuration can be found in `config.example.js`. This file contains examples and explanations for each config value.
69
81
70
82
If your configuration is not valid, sqtracker will fail to start.
| SQ_SITE_NAME | envs | sqtracker demo | The name of your tracker site |
75
-
| SQ_SITE_DESCRIPTION | envs | My very own private tracker | A short description of your tracker site |
76
-
| SQ_THEME_COLOUR | envs | #f45d48 | A hex colour code used as the main theme colour of your site |
77
-
| SQ_ALLOW_REGISTER | envs |`invite`| Registration mode. Either `open`, `invite` or `closed`|
78
-
| SQ_ALLOW_ANONYMOUS_UPLOADS | envs |`false`| Whether or not users can upload torrents anonymously. Either `true` or `false`|
79
-
| SQ_MINIMUM_RATIO | envs | 0.75 | Minimum allowed ratio. Below this users will not be able to download |
80
-
| SQ_BP_EARNED_PER_GB | envs | 1 | Number of bonus points awarded to a user for each GB they upload |
81
-
| SQ_BP_COST_PER_INVITE | envs | 3 | Number of bonus it costs a user to buy 1 invite (set to 0 to disable buying invites) |
82
-
| SQ_BP_COST_PER_GB | envs | 3 | Number of bonus it costs a user to buy 1 GB of upload (set to 0 to disable buying upload) |
83
-
| SQ_SITE_WIDE_FREELEECH | envs |`false`| Whether or not to enable freeleech on all torrents |
84
-
| SQ_TORRENT_CATEGORIES | envs |`{ "Movies": ["HD", ...], "TV": [...] }`| A dictionary of categories, each with an array of zero or more sources available within that category |
85
-
| SQ_ALLOW_UNREGISTERED_VIEW | envs |`false`| Whether or not torrent pages can be viewed by unregistered users. If true, only logged in users will be able to download/interact, but anyone (search engines included) will be able to view/read torrent info. |
86
-
| SQ_BASE_URL | envs |https://demo.sqtracker.dev| The URL of your tracker site |
87
-
| SQ_API_URL | envs |https://demo.sqtracker.dev/api| The URL of your API. Under the recommended setup, it should be `${SQ_BASE_URL}/api`|
88
-
| SQ_MONGO_URL | envs | mongodb://sq_mongodb/sq | The URL of your MongoDB server. Under the recommended setup, it should be `mongodb://sq_mongodb/sq`|
89
-
| SQ_MAIL_FROM_ADDRESS | envs |mail@sqtracker.dev| The address that mail will be sent from |
90
-
| SQ_SMTP_HOST | envs | smtp.example.com | The hostname of your SMTP server |
91
-
| SQ_SMTP_PORT | envs | 587 | The port of your SMTP server |
92
-
| SQ_SMTP_SECURE | envs |`false`| Whether or not to force SMTP TLS: if true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false |
93
-
| SQ_JWT_SECRET | secrets | — | A secret value to sign tokens with. Should be long and random |
94
-
| SQ_SERVER_SECRET | secrets | — | A secret value to verify server requests with. Should be long and random, and different to the JWT secret |
95
-
| SQ_ADMIN_EMAIL | secrets |admin@example.com| The email address to use for the initial admin user. Must be valid |
96
-
| SQ_SMTP_USER | secrets | — | The username to authenticate with your SMTP server with |
97
-
| SQ_SMTP_PASS | secrets | — | The password to authenticate with your SMTP server with |
98
-
99
-
### Example configuration
100
-
101
-
An example configuration can be found in `config.example.js`.
0 commit comments