Skip to content

Commit

Permalink
Merge #556: Rename tracker env vars
Browse files Browse the repository at this point in the history
f8f08ec refactor: [#555] rename tracker env vars (Jose Celano)

Pull request description:

  Rename tracker env vars to follow changes in: torrust/torrust-tracker#851

  ```
  TORRUST_TRACKER_BACK_           -> TORRUST_TRACKER_
  TORRUST_TRACKER_DATABASE_DRIVER -> TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER
  TORRUST_TRACKER_API_ADMIN_TOKEN -> TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN
  TORRUST_TRACKER_CONFIG          -> TORRUST_TRACKER_CONFIG_TOML
  TORRUST_TRACKER_PATH_CONFIG     -> TORRUST_TRACKER_CONFIG_TOML_PATH
  ```

ACKs for top commit:
  josecelano:
    ACK f8f08ec

Tree-SHA512: 03b9aa3f66b62ca72275a35395632b955cdb761cff982d46c5650e6c0a82fb54c595b6e94400b7f2e667b27da15cd6a4df96f1d9afabc8c73223bf7af806f27f
  • Loading branch information
josecelano committed May 14, 2024
2 parents ca9ac7d + f8f08ec commit a3482df
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ DATABASE_URL=sqlite://storage/database/data.db?mode=rwc
# Docker compose
TORRUST_INDEX_CONFIG=
USER_ID=1000
TORRUST_TRACKER_CONFIG=
TORRUST_TRACKER_CONFIG_TOML=
TORRUST_TRACKER_USER_UID=1000
TORRUST_TRACKER_API_TOKEN=MyAccessToken
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN=MyAccessToken
6 changes: 3 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ services:
tty: true
environment:
- USER_ID=${USER_ID}
- TORRUST_TRACKER_CONFIG=${TORRUST_TRACKER_CONFIG}
- TORRUST_TRACKER_CONFIG_TOML=${TORRUST_TRACKER_CONFIG_TOML}
- TORRUST_TRACKER_DATABASE=${TORRUST_TRACKER_DATABASE:-e2e_testing_sqlite3}
- TORRUST_TRACKER_DATABASE_DRIVER=${TORRUST_TRACKER_DATABASE_DRIVER:-sqlite3}
- TORRUST_TRACKER_API_ADMIN_TOKEN=${TORRUST_TRACKER_API_ADMIN_TOKEN:-MyAccessToken}
- TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER=${TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER:-Sqlite3}
- TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN=${TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN:-MyAccessToken}
networks:
- server_side
ports:
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
Expand Up @@ -2,5 +2,5 @@

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
docker compose down
8 changes: 4 additions & 4 deletions contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG=$(cat ./share/default/config/tracker.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_DATABASE="e2e_testing_sqlite3" \
TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \
TORRUST_INDEX_TRACKER_API_TOKEN="MyAccessToken" \
TORRUST_TRACKER_CONFIG=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \
TORRUST_TRACKER_DATABASE_DRIVER="sqlite3" \
TORRUST_TRACKER_API_ADMIN_TOKEN="MyAccessToken" \
TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MyAccessToken" \
docker compose up --detach --pull always --remove-orphans
8 changes: 4 additions & 4 deletions docs/containerization_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,18 +278,18 @@ mkdir -p ./storage/index-gui/log/

USER_ID=${USER_ID:-1000} \
TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG=$(cat ./share/default/config/tracker.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_DATABASE="e2e_testing_sqlite3" \
TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \
TORRUST_INDEX_TRACKER_API_TOKEN="MyAccessToken" \
TORRUST_TRACKER_CONFIG=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \
TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \
TORRUST_TRACKER_DATABASE_DRIVER="sqlite3" \
TORRUST_TRACKER_API_ADMIN_TOKEN="MyAccessToken" \
TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MyAccessToken" \
docker compose up --detach --pull always --remove-orphans
```

Expand Down
4 changes: 2 additions & 2 deletions dot.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ DATABASE_URL=sqlite://storage/database/data.db?mode=rwc
# Docker compose
TORRUST_INDEX_CONFIG=
USER_ID=1000
TORRUST_TRACKER_CONFIG=
TORRUST_TRACKER_API_TOKEN=MyAccessToken
TORRUST_TRACKER_CONFIG_TOML=
TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN=MyAccessToken
4 changes: 0 additions & 4 deletions share/default/config/tracker.container.mysql.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
ssl_enabled = false
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

# Please override the admin token setting the
# `TORRUST_TRACKER_API_ADMIN_TOKEN`
# environmental variable!

[http_api.access_tokens]
admin = "MyAccessToken"

Expand Down
4 changes: 0 additions & 4 deletions share/default/config/tracker.container.sqlite3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
ssl_enabled = false
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

# Please override the admin token setting the
# `TORRUST_TRACKER_API_ADMIN_TOKEN`
# environmental variable!

[http_api.access_tokens]
admin = "MyAccessToken"

Expand Down
4 changes: 0 additions & 4 deletions share/default/config/tracker.e2e.container.sqlite3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
ssl_enabled = false
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"

# Please override the admin token setting the
# `TORRUST_TRACKER_API_ADMIN_TOKEN`
# environmental variable!

[http_api.access_tokens]
admin = "MyAccessToken"

Expand Down

0 comments on commit a3482df

Please sign in to comment.