Skip to content

Commit

Permalink
Merge #564: Rename Index env vars
Browse files Browse the repository at this point in the history
2c21ed9 rrefactor: [#562] rename index env vars (Jose Celano)

Pull request description:

  Rename Index env vars.

  ```
  TORRUST_INDEX_CONFIG             -> TORRUST_INDEX_CONFIG_TOML
  TORRUST_INDEX_PATH_CONFIG        -> TORRUST_INDEX_CONFIG_TOML_PATH
  TORRUST_INDEX_TRACKER_API_TOKEN  -> TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN
  TORRUST_INDEX_AUTH_SECRET_KEY    -> TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY
  ```

ACKs for top commit:
  josecelano:
    ACK 2c21ed9

Tree-SHA512: 8ab49e936e1297a32cb3b624497ff24fc00acaacbacf8b8026360afbe3f900597c9991a9cabf34c64712bd884fd336444eb7b31bff61fdb67b970e2c7540bbdc
  • Loading branch information
josecelano committed May 24, 2024
2 parents 9b105ef + 2c21ed9 commit 8c93b81
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ API_BASE_URL=http://localhost:3001/v1
DATABASE_URL=sqlite://storage/database/data.db?mode=rwc

# Docker compose
TORRUST_INDEX_CONFIG=
TORRUST_INDEX_CONFIG_TOML=
USER_ID=1000
TORRUST_TRACKER_CONFIG_TOML=
TORRUST_TRACKER_USER_UID=1000
Expand Down
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ services:
tty: true
environment:
- USER_ID=${USER_ID}
- TORRUST_INDEX_CONFIG=${TORRUST_INDEX_CONFIG}
- TORRUST_INDEX_CONFIG_TOML=${TORRUST_INDEX_CONFIG_TOML}
- TORRUST_INDEX_DATABASE=${TORRUST_INDEX_DATABASE:-e2e_testing_sqlite3}
- TORRUST_INDEX_DATABASE_DRIVER=${TORRUST_INDEX_DATABASE_DRIVER:-sqlite3}
- TORRUST_INDEX_TRACKER_API_TOKEN=${TORRUST_INDEX_TRACKER_API_TOKEN:-MyAccessToken}
- TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN=${TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN:-MyAccessToken}
- TORRUST_INDEX_API_CORS_PERMISSIVE=${TORRUST_INDEX_API_CORS_PERMISSIVE:-true}
networks:
- server_side
Expand Down
2 changes: 1 addition & 1 deletion contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
docker compose down
6 changes: 3 additions & 3 deletions contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
docker compose build

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_INDEX_DATABASE="e2e_testing_sqlite3" \
TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \
TORRUST_INDEX_TRACKER_API_TOKEN="MyAccessToken" \
TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \
TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \
Expand Down
6 changes: 3 additions & 3 deletions docs/containerization_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ Please refer to their documentation for more information.
mkdir -p ./storage/index-gui/log/

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
docker compose build

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_INDEX_DATABASE="e2e_testing_sqlite3" \
TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \
TORRUST_INDEX_TRACKER_API_TOKEN="MyAccessToken" \
TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \
TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \
Expand Down
2 changes: 1 addition & 1 deletion dot.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ API_BASE_URL=http://localhost:3001/v1
DATABASE_URL=sqlite://storage/database/data.db?mode=rwc

# Docker compose
TORRUST_INDEX_CONFIG=
TORRUST_INDEX_CONFIG_TOML=
USER_ID=1000
TORRUST_TRACKER_CONFIG_TOML=
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN=MyAccessToken
2 changes: 1 addition & 1 deletion share/default/config/index.container.mysql.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ log_level = "info"
name = "Torrust"

# Please override the tracker token setting the
# `TORRUST_INDEX_TRACKER_API_TOKEN`
# `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN`
# environmental variable!

[tracker]
Expand Down
2 changes: 1 addition & 1 deletion share/default/config/index.container.sqlite3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ log_level = "info"
name = "Torrust"

# Please override the tracker token setting the
# `TORRUST_INDEX_TRACKER_API_TOKEN`
# `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN`
# environmental variable!

[tracker]
Expand Down
2 changes: 1 addition & 1 deletion share/default/config/index.e2e.container.mysql.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ log_level = "info"
name = "Torrust"

# Please override the tracker token setting the
# `TORRUST_INDEX_TRACKER_API_TOKEN`
# `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN`
# environmental variable!

[tracker]
Expand Down
2 changes: 1 addition & 1 deletion share/default/config/index.e2e.container.sqlite3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ log_level = "info"
name = "Torrust"

# Please override the tracker token setting the
# `TORRUST_INDEX_TRACKER_API_TOKEN`
# `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN`
# environmental variable!

[tracker]
Expand Down

0 comments on commit 8c93b81

Please sign in to comment.