Skip to content

Commit

Permalink
dev: vairous fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed Sep 7, 2023
1 parent 698890a commit 1993c68
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ 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 +129,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

0 comments on commit 1993c68

Please sign in to comment.