Skip to content

Commit 6ec9f99

Browse files
committed
dev: vairous fixes
1 parent 698890a commit 6ec9f99

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.github/workflows/container.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,14 @@ jobs:
6565
- id: check
6666
name: Check Context
6767
run: |
68-
if [[ "${{ github.event_name }}" == "push" && ( "${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" == "refs/heads/develop" || "${{ github.ref }}" == "refs/heads/docker" ) ]] ||
69-
[[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
70-
if [[ "${{ github.repository }}" == "torrust/torrust-tracker" ]]; then
71-
echo "Context is torrust/torrust-tracker, and push is: main, develop, docker, or a tag of v*.*.*"
72-
echo "continue=true" >> $GITHUB_OUTPUT
68+
if [[ "${{ github.repository }}" == "torrust/torrust-tracker" ]]; then
69+
if [[ "${{ github.event_name }}" == "push" ]]; then
70+
if [[ ( "${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" == "refs/heads/develop" ]] ||
71+
"${{ 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
72+
73+
echo "Context is torrust/torrust-tracker, and push is: main, develop, docker, or a tag with a semantic version"
74+
echo "continue=true" >> $GITHUB_OUTPUT
75+
fi
7376
fi
7477
fi
7578
@@ -126,7 +129,7 @@ jobs:
126129
uses: docker/build-push-action@v4
127130
with:
128131
file: ./Containerfile
129-
push: ${{ github.event_name != 'pull_request' }}
132+
push: true
130133
tags: ${{ steps.meta.outputs.tags }}
131134
labels: ${{ steps.meta.outputs.labels }}
132135
cache-from: type=gha

docs/containers.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/
196196
## Run Torrust Tracker Container Image
197197
docker run -it \
198198
--env TORRUST_TRACKER_API_ADMIN_TOKEN="MySecretToken" \
199-
--env USER_ID"$(id -u)" \
199+
--env USER_ID="$(id -u)" \
200200
--publish 0.0.0.0:7070:7070/tcp \
201201
--publish 0.0.0.0:6969:6969/udp \
202202
--publish 0.0.0.0:1212:1212/tcp \
@@ -218,7 +218,7 @@ mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/
218218
## Run Torrust Tracker Container Image
219219
podman run -it \
220220
--env TORRUST_TRACKER_API_ADMIN_TOKEN="MySecretToken" \
221-
--env USER_ID"$(id -u)" \
221+
--env USER_ID="$(id -u)" \
222222
--publish 0.0.0.0:7070:7070/tcp \
223223
--publish 0.0.0.0:6969:6969/udp \
224224
--publish 0.0.0.0:1212:1212/tcp \
@@ -367,6 +367,7 @@ And finally, you can run the container:
367367

368368
```s
369369
docker run \
370+
--env USER_ID="$(id -u)" \
370371
--publish 6969:6969/udp \
371372
--publish 7070:7070/tcp \
372373
--publish 1212:1212/tcp \
@@ -381,6 +382,7 @@ Detach from container logs when the container starts. By default, the command li
381382
```s
382383
docker run \
383384
--detach
385+
--env USER_ID="$(id -u)" \
384386
--publish 6969:6969/udp \
385387
--publish 7070:7070/tcp \
386388
--publish 1212:1212/tcp \latest

share/container/message

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11

2+
Lovely welcome to our Torrust Tracker Container!
3+
24
run 'torrust-tracker' to start tracker

0 commit comments

Comments
 (0)