diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4dafa0e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: ci + +on: + push: + branches: + - 'master' + - 'main' + tags: + - '*' + workflow_dispatch: + schedule: + - cron: '0 21 * * 0,1,3,5' +jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - + name: Inspect builder + run: | + echo "Name: ${{ steps.buildx.outputs.name }}" + echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" + echo "Status: ${{ steps.buildx.outputs.status }}" + echo "Flags: ${{ steps.buildx.outputs.flags }}" + echo "Platforms: ${{ steps.buildx.outputs.platforms }}" + - + name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - + name: Build dockerfile (with push) + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64/v8 \ + --output "type=image,push=true" \ + --file ./Dockerfile . \ + --tag dyrnq/nginx-proxy:latest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c07a74d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build.sh \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f139b1e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM alpine:edge +RUN \ +apk add --no-cache --update \ +bash \ +curl \ +git \ +ca-certificates \ +openssl \ +wget \ +zip \ +unzip \ +xz \ +tar \ +nginx-mod-dynamic-healthcheck nginx-mod-http-headers-more nginx-mod-stream nginx-mod-dynamic-upstream iproute2 psmisc socat jq && \ +ln -sf /dev/stdout /var/log/nginx/access.log && \ +ln -sf /dev/stderr /var/log/nginx/error.log && \ +rm -rf /var/cache/apk/* + +COPY docker-entrypoint.sh / +# COPY 10-listen-on-ipv6-by-default.sh /docker-entrypoint.d +# COPY 15-local-resolvers.envsh /docker-entrypoint.d +# COPY 20-envsubst-on-templates.sh /docker-entrypoint.d +# COPY 30-tune-worker-processes.sh /docker-entrypoint.d +ENTRYPOINT ["/docker-entrypoint.sh"] + +EXPOSE 80 + +STOPSIGNAL SIGQUIT + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d89f3aa --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# nginx-proxy diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..fb889a3 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e + + +exec "$@" \ No newline at end of file