Skip to content

Commit 1093e61

Browse files
committed
Merge #571: Refactor: simplify index and tracker config files
59cd566 docs: [#570] udpate development guide (Jose Celano) a9b13f0 refactor: [#570] remove default options from config files (Jose Celano) 4f86343 chore: remove unused config files (Jose Celano) Pull request description: Refactor: simplify index and tracker config files. ACKs for top commit: josecelano: ACK 59cd566 Tree-SHA512: 3d805021fe795ccbd99b9b0e06f9e6504cca6039af6a0a095915e99298f3bf3e57c259d94feaa76a1c753e684231664371fc697ef9af57836c953a9554651f68
2 parents a22dae8 + 59cd566 commit 1093e61

10 files changed

+12
-389
lines changed

docs/development_guide.md

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -106,48 +106,11 @@ Please refer to their respective documentation for more information.
106106

107107
## Run the tracker
108108

109-
For the requirements please refer to the [Tracker documentation][tracker].
110-
111-
```s
112-
git clone [email protected]:torrust/torrust-tracker.git
113-
cd torrust-tracker
114-
./contrib/dev-tools/init/install-local.sh
115-
cargo run
116-
```
117-
118-
```s
119-
Loading default configuration file: `./share/default/config/tracker.development.sqlite3.toml` ...
120-
2023-11-29T16:27:04.662938414+00:00 [torrust_tracker::bootstrap::logging][INFO] logging initialized.
121-
2023-11-29T16:27:04.667771053+00:00 [torrust_tracker::bootstrap::jobs::tracker_apis][INFO] Starting Torrust APIs server on: http://127.0.0.1:1212
122-
2023-11-29T16:27:04.667933262+00:00 [torrust_tracker::bootstrap::jobs::tracker_apis][INFO] Torrust APIs server started
123-
2023-11-29T16:27:04.667946602+00:00 [torrust_tracker::bootstrap::jobs::health_check_api][INFO] Starting Health Check API server: http://127.0.0.1:1313
124-
2023-11-29T16:27:04.667998942+00:00 [torrust_tracker::servers::health_check_api::server][INFO] Health Check API server listening on http://127.0.0.1:1313
125-
2023-11-29T16:27:04.668007992+00:00 [torrust_tracker::bootstrap::jobs::health_check_api][INFO] Torrust Health Check API server started
126-
```
127-
128-
Please refer to the [Tracker documentation][tracker] for more information.
109+
Please refer to the [Tracker documentation][tracker].
129110

130111
## Run the Index
131112

132-
For the requirements please refer to the [Index documentation][index].
133-
134-
```s
135-
git clone [email protected]:torrust/torrust-index.git
136-
cd torrust-index/
137-
./contrib/dev-tools/init/install-local.sh
138-
TORRUST_INDEX_API_CORS_PERMISSIVE=true cargo run
139-
```
140-
141-
```s
142-
Loading default configuration file: `./share/default/config/index.development.sqlite3.toml` ...
143-
2023-11-29T16:32:56.657072410+00:00 [torrust_index::bootstrap::logging][INFO] logging initialized.
144-
...
145-
2023-11-29T16:32:56.811232959+00:00 [torrust_index::web::api::server][INFO] Starting API server with net config: 0.0.0.0:3001 ...
146-
2023-11-29T16:32:56.811209440+00:00 [torrust_index::console::tracker_statistics_importer][INFO] Tracker statistics importer launcher started
147-
2023-11-29T16:32:56.811322268+00:00 [torrust_index::web::api::server][INFO] API server listening on http://0.0.0.0:3001
148-
2023-11-29T16:32:56.811342498+00:00 [torrust_index::console::tracker_statistics_importer][INFO] Tracker statistics importer cronjob starting ...
149-
2023-11-29T16:32:56.811527765+00:00 [torrust_index::console::tracker_statistics_importer][INFO] Tracker statistics importer API server listening on http://127.0.0.1:3002
150-
```
113+
Please refer to the [Index documentation][index].
151114

152115
By default, the Index API has the most restrictive CORS policy. This means that the Index GUI cannot access the Index API, because they are running on different ports. If you run the backend as it is, you will see the following error in the browser console.
153116

@@ -157,8 +120,6 @@ Access to fetch at 'http://localhost:3001/v1/torrents?page_size=50&page=0&sort=U
157120

158121
You need to enable the Cors layer with the permissive option setting the environment variable `TORRUST_INDEX_API_CORS_PERMISSIVE` to `true`.
159122

160-
Please refer to the [Index documentation][index] for more information.
161-
162123
## Run the Index GUI
163124

164125
Requirements:
@@ -250,6 +211,13 @@ export default defineConfig({
250211
addCategory: ({ name }) => {
251212
return addCategory(name, databaseConfig(config));
252213
},
214+
// Tag context
215+
deleteTags: () => {
216+
return deleteTags(databaseConfig(config));
217+
},
218+
addTag: ({ name }) => {
219+
return addTag(name, databaseConfig(config));
220+
},
253221
// Torrent context
254222
deleteTorrent: ({ infohash }) => {
255223
return deleteTorrent(infohash, databaseConfig(config));

project-words.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
caniuse
2+
codecov
13
composables
24
Containerfile
35
daisyui
@@ -11,6 +13,7 @@ infohash
1113
lintfix
1214
mailcatcher
1315
notiwind
16+
Nuxi
1417
Nuxt
1518
nuxtjs
1619
proxied

share/default/config/index.container.mysql.toml

Lines changed: 0 additions & 51 deletions
This file was deleted.

share/default/config/index.container.sqlite3.toml

Lines changed: 0 additions & 51 deletions
This file was deleted.

share/default/config/index.development.sqlite3.toml

Lines changed: 0 additions & 47 deletions
This file was deleted.

share/default/config/index.e2e.container.mysql.toml

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,10 @@
1-
log_level = "info"
2-
3-
[website]
4-
name = "Torrust"
5-
6-
# Please override the tracker token setting the
7-
# `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN`
8-
# environmental variable!
9-
101
[tracker]
112
url = "udp://tracker:6969"
12-
mode = "Public"
133
api_url = "http://tracker:1212"
14-
token = "MyAccessToken"
15-
token_valid_seconds = 7257600
16-
17-
[net]
18-
port = 3001
19-
20-
[auth]
21-
email_on_signup = "Optional"
22-
min_password_length = 6
23-
max_password_length = 64
24-
secret_key = "MaxVerstappenWC2021"
254

265
[database]
276
connect_url = "sqlite:///var/lib/torrust/index/database/e2e_testing_sqlite3.db?mode=rwc"
287

298
[mail]
30-
email_verification_enabled = false
31-
32-
reply_to = "[email protected]"
33-
username = ""
34-
password = ""
359
server = "mailcatcher"
3610
port = 1025
37-
38-
[image_cache]
39-
max_request_timeout_ms = 1000
40-
capacity = 128000000
41-
entry_size_limit = 4000000
42-
user_quota_period_seconds = 3600
43-
user_quota_bytes = 64000000
44-
45-
[api]
46-
default_torrent_page_size = 10
47-
max_torrent_page_size = 30
48-
49-
[tracker_statistics_importer]
50-
torrent_info_update_interval = 3600
51-
port = 3002

share/default/config/tracker.container.mysql.toml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)