-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
38 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ config.toml | |
config.toml.local | ||
cSpell.json | ||
data.db | ||
docker/ | ||
/docker/bin/ | ||
NOTICE | ||
README.md | ||
rustfmt.toml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#!/bin/bash | ||
|
||
TORRUST_TRACKER_USER_UID=${TORRUST_TRACKER_USER_UID:-1000} | ||
TORRUST_TRACKER_RUN_AS_USER=${TORRUST_TRACKER_RUN_AS_USER:-appuser} | ||
CURRENT_USER_NAME=$(whoami) | ||
CURRENT_USER_ID=$(id -u) | ||
echo "User name: $CURRENT_USER_NAME" | ||
echo "User id: $CURRENT_USER_ID" | ||
|
||
USER_ID=$CURRENT_USER_ID | ||
export USER_ID | ||
|
||
|
||
echo "Building docker image ..." | ||
echo "TORRUST_TRACKER_USER_UID: $TORRUST_TRACKER_USER_UID" | ||
echo "TORRUST_TRACKER_RUN_AS_USER: $TORRUST_TRACKER_RUN_AS_USER" | ||
|
||
docker build \ | ||
--build-arg UID="$TORRUST_TRACKER_USER_UID" \ | ||
--build-arg RUN_AS_USER="$TORRUST_TRACKER_RUN_AS_USER" \ | ||
-t torrust-tracker . | ||
docker build --target debug --tag torrust-tracker:debug . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/bin/bash | ||
|
||
TORRUST_TRACKER_USER_UID=${TORRUST_TRACKER_USER_UID:-1000} | ||
TORRUST_TRACKER_CONFIG=$(cat config.toml) | ||
|
||
docker run -it \ | ||
--user="$TORRUST_TRACKER_USER_UID" \ | ||
--user="$(whoami)" \ | ||
--publish 6969:6969/udp \ | ||
--publish 7070:7070/tcp \ | ||
--publish 1212:1212/tcp \ | ||
--env TORRUST_TRACKER_CONFIG="$TORRUST_TRACKER_CONFIG" \ | ||
--volume "$(pwd)/storage":"/app/storage" \ | ||
torrust-tracker | ||
--entrypoint torrust-tracker \ | ||
torrust-tracker:debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/bin/bash | ||
|
||
TORRUST_TRACKER_USER_UID=${TORRUST_TRACKER_USER_UID:-1000} | ||
TORRUST_TRACKER_CONFIG=$(cat config.toml) | ||
|
||
docker run -it \ | ||
--user="$TORRUST_TRACKER_USER_UID" \ | ||
--user="$(whoami)" \ | ||
--publish 6969:6969/udp \ | ||
--publish 7070:7070/tcp \ | ||
--publish 1212:1212/tcp \ | ||
--env TORRUST_TRACKER_CONFIG="$TORRUST_TRACKER_CONFIG" \ | ||
--volume "$(pwd)/storage":"/app/storage" \ | ||
--entrypoint torrust-tracker \ | ||
torrust/tracker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
in debug mode | ||
|
||
run 'torrust-tracker' to start tracker |