diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a6d37ab..71650f8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,7 +42,7 @@ jobs: - name: Upload SARIF file if: ${{ steps.scan.outputs.sarif != '' }} - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: ${{ steps.scan.outputs.sarif }} diff --git a/Dockerfile b/Dockerfile index 96dac6e..d4eb599 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ LABEL org.opencontainers.image.source=https://github.com/statista-oss/proxy-rout LABEL org.opencontainers.image.description="haproxy configurable through env vars for different routing strategies" USER root -RUN apk add --no-cache curl socat +RUN apk add --no-cache socat USER haproxy diff --git a/README.md b/README.md index dc5f654..98c1b5c 100644 --- a/README.md +++ b/README.md @@ -88,4 +88,41 @@ curl -I --cookie "my_app_routing=new" localhost:80 ## Usage -tbd \ No newline at end of file +### Docker-Compose + +```yaml + routing-proxy: + image: ghcr.io/statista-oss/routing-proxy:latest + environment: + STRATEGY: PERCENTAGE + OLD_DOMAIN: haproxy.com:443 + NEW_DOMAIN: apache.org:443 + COOKIE_PERCENTAGE_NAME: my_app + PERCENTAGE_OLD: 50 + PERCENTAGE_NEW: 50 + ports: + - 80:80 +``` + +currently only HTTP (as it mostly will run behind an SSL loadbalancer anyways) is supported. + +### ECS Fargate + +when defining this image in your `Task-Definition`, make sure you add those `systemControls`: + +```js +{ + systemControls: [ + { + namespace: 'net.ipv4.ip_unprivileged_port_start', + value: '0', + } + ] +} +``` + +## TODOS + +- [ ] add SSL support +- [ ] logging support? +- [ ] route based on specific users/user-groups (cookie lookups) \ No newline at end of file