Skip to content

Commit

Permalink
Merge #19: Update Index configuration
Browse files Browse the repository at this point in the history
fe02253 fix: [#6] update index configuration (Jose Celano)

Pull request description:

  To follow breaking changes in the Index config TOML files and env var names.

ACKs for top commit:
  josecelano:
    ACK fe02253

Tree-SHA512: 7254dc1ff0627dd7e0b730128555fcdbbdecbdc2e1a6d4c5c90a994868edfdac0ff97d53b28fbef41fd145489b753c0d7b6bf8016c6950d9e35afdc947b9771b
  • Loading branch information
josecelano committed Jun 14, 2024
2 parents 1485c4f + fe02253 commit 750e6b9
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
8 changes: 5 additions & 3 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ useDefault = true
[allowlist]
paths = [
'''.automation/test''',
'''megalinter-reports''',
'''.github/linters''',
'''node_modules''',
'''.mypy_cache''',
'''(.*?)gitleaks\.toml$''',
'''(.*?)(png|jpg|gif|doc|docx|pdf|bin|xls|pyc|zip)$''',
'''(.*?)gitleaks\.toml$''',
'''(go.mod|go.sum)$''',
'''demo/config-idx-back.local.toml''',
'''demo/config-index.local.toml''',
'''demo/config-tracker.local.toml''',
'''demo/dot.env.local''',
'''droplet/.env.production''',
'''droplet/share/container/default/config/index.prod.container.sqlite3.toml''',
'''megalinter-reports''',
'''node_modules''',
]
description = "Allowlisted files"
1 change: 1 addition & 0 deletions demo/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
- TORRUST_INDEX_DATABASE=${TORRUST_INDEX_DATABASE:-e2e_testing_sqlite3}
- TORRUST_INDEX_DATABASE_DRIVER=${TORRUST_INDEX_DATABASE_DRIVER:-sqlite3}
- TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN=${TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN:-MyAccessToken}
- TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY=${TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY:-MaxVerstappenWC2021}
- TORRUST_INDEX_API_CORS_PERMISSIVE=${TORRUST_INDEX_API_CORS_PERMISSIVE:-true}
- CARGO_HOME=/home/appuser/.cargo
networks:
Expand Down
15 changes: 10 additions & 5 deletions demo/dot.env.local
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# App build variables
## App build variables
API_BASE_URL=http://localhost:3001/v1

# Rust SQLx
## Rust SQLx
DATABASE_URL=sqlite://storage/database/data.db?mode=rwc

# Docker compose
## Docker compose
USER_ID=1000

### Index
TORRUST_INDEX_CONFIG_TOML=
TORRUST_INDEX_USER_UID=1000
TORRUST_INDEX_API_CORS_PERMISSIVE=true
TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY='MaxVerstappenWC2021'
TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN='MyAccessToken'

### Tracker
TORRUST_TRACKER_CONFIG_TOML=
TORRUST_TRACKER_USER_UID=1000
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN=MyAccessToken
6 changes: 3 additions & 3 deletions droplet/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ USER_ID=1000

# Index GUI
TORRUST_INDEX_GUI_API_BASE_URL='https://index.torrust-demo.com/api/v1'
NITRO_HOST="0.0.0.0"
NITRO_HOST=0.0.0.0
NITRO_PORT=3000

# Index
TORRUST_INDEX_CONFIG_TOML=
TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN='MyAccessToken'
TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY='MyAccessToken'
TORRUST_INDEX_API_CORS_PERMISSIVE=false
TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY='MaxVerstappenWC2021'
TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN='MyAccessToken'

# Tracker
TORRUST_TRACKER_CONFIG_TOML=
Expand Down
1 change: 1 addition & 0 deletions droplet/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
- TORRUST_INDEX_DATABASE=${TORRUST_INDEX_DATABASE:-sqlite3}
- TORRUST_INDEX_DATABASE_DRIVER=${TORRUST_INDEX_DATABASE_DRIVER:-sqlite3}
- TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN=${TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN:-MyAccessToken}
- TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY=${TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY:-MaxVerstappenWC2021}
- TORRUST_INDEX_API_CORS_PERMISSIVE=${TORRUST_INDEX_API_CORS_PERMISSIVE:-true}
networks:
- backend_network
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# Please override the tracker token:
# `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN`
# And the auth screte key:
# `TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY`
# environmental variables!

[tracker]
url = "udp://tracker.torrust-demo.com:6969"
api_url = "http://tracker:1212"
url = "udp://tracker.torrust-demo.com:6969"

[database]
connect_url = "sqlite:///var/lib/torrust/index/database/sqlite3.db?mode=rwc"

[mail]
server = "mailcatcher"
[mail.smtp]
port = 1025
server = "mailcatcher"
4 changes: 2 additions & 2 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ stefanzweifel
torrust
Torrust
TORRUST
TORRUST
webroot
Verstappen
webroot

0 comments on commit 750e6b9

Please sign in to comment.