Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: vairous fixes #404

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ jobs:
- id: check
name: Check Context
run: |
if [[ "${{ github.event_name }}" == "push" && ( "${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" == "refs/heads/develop" || "${{ github.ref }}" == "refs/heads/docker" ) ]] ||
[[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
if [[ "${{ github.repository }}" == "torrust/torrust-tracker" ]]; then
echo "Context is torrust/torrust-tracker, and push is: main, develop, docker, or a tag of v*.*.*"
echo "continue=true" >> $GITHUB_OUTPUT
if [[ "${{ github.repository }}" == "torrust/torrust-tracker" ]]; then
if [[ "${{ github.event_name }}" == "push" ]]; then
if [[ "${{ github.ref }}" == "refs/heads/main" ||
"${{ github.ref }}" == "refs/heads/develop" ||
"${{ github.ref }}" =~ ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ ]]; then
echo "Context is torrust/torrust-tracker, and push is: main, develop, docker, or a tag with a semantic version"
echo "continue=true" >> $GITHUB_OUTPUT
fi
fi
fi
Expand Down Expand Up @@ -126,7 +130,7 @@ jobs:
uses: docker/build-push-action@v4
with:
file: ./Containerfile
push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
6 changes: 4 additions & 2 deletions docs/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/
## Run Torrust Tracker Container Image
docker run -it \
--env TORRUST_TRACKER_API_ADMIN_TOKEN="MySecretToken" \
--env USER_ID"$(id -u)" \
--env USER_ID="$(id -u)" \
--publish 0.0.0.0:7070:7070/tcp \
--publish 0.0.0.0:6969:6969/udp \
--publish 0.0.0.0:1212:1212/tcp \
Expand All @@ -218,7 +218,7 @@ mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/
## Run Torrust Tracker Container Image
podman run -it \
--env TORRUST_TRACKER_API_ADMIN_TOKEN="MySecretToken" \
--env USER_ID"$(id -u)" \
--env USER_ID="$(id -u)" \
--publish 0.0.0.0:7070:7070/tcp \
--publish 0.0.0.0:6969:6969/udp \
--publish 0.0.0.0:1212:1212/tcp \
Expand Down Expand Up @@ -367,6 +367,7 @@ And finally, you can run the container:

```s
docker run \
--env USER_ID="$(id -u)" \
--publish 6969:6969/udp \
--publish 7070:7070/tcp \
--publish 1212:1212/tcp \
Expand All @@ -381,6 +382,7 @@ Detach from container logs when the container starts. By default, the command li
```s
docker run \
--detach
--env USER_ID="$(id -u)" \
--publish 6969:6969/udp \
--publish 7070:7070/tcp \
--publish 1212:1212/tcp \latest
Expand Down
2 changes: 2 additions & 0 deletions share/container/message
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@

Lovely welcome to our Torrust Tracker Container!

run 'torrust-tracker' to start tracker