diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 30b9a3d..bc05df2 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -17,6 +17,8 @@ jobs: REPOSITORY: ${{ gitea.repository }} #registry.bitdeals.org REGISTRY: 10.0.3.111:5000 + USER: ${{ secrets.DOCKER_USERNAME }} + PASS: ${{ secrets.DOCKER_PASSWORD }} steps: - name: Checkout repository code uses: actions/checkout@v6 @@ -25,10 +27,13 @@ jobs: docker build . \ --file "$(find ./Dockerfile ./docker/Dockerfile -print -quit 2>/dev/null)" \ --label "git-commit=$COMMIT" \ - --tag "$REGISTRY"/"${REPOSITORY##*/}":"$VERSION"."${COMMIT::7}" \ - --tag "$REGISTRY"/"${REPOSITORY##*/}":latest + --tag "${REGISTRY}/${REPOSITORY##*/}:${VERSION}.${COMMIT::7}" \ + --tag "${REGISTRY}/${REPOSITORY##*/}:latest" + - name: Docker login + run: | + docker login --username "$USER" --password "$PASS" "$REGISTRY" - name: Push images to registry run: | - docker push "$REGISTRY"/${REPOSITORY##*/}:$VERSION.${COMMIT::7} ; \ - docker push "$REGISTRY"/${REPOSITORY##*/}:latest + docker push "${REGISTRY}/${REPOSITORY##*/}:${VERSION}.${COMMIT::7}" ; \ + docker push "${REGISTRY}/${REPOSITORY##*/}:latest" diff --git a/etc/nginx/http.d/trac.conf b/etc/nginx/http.d/trac.conf new file mode 100644 index 0000000..f2a8676 --- /dev/null +++ b/etc/nginx/http.d/trac.conf @@ -0,0 +1,14 @@ +server { + server_name _; + + location / { + proxy_pass http://localhost:8055; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + listen 80; +} +