Skip to content

Commit

Permalink
fix: deployment with clarity id (#4758)
Browse files Browse the repository at this point in the history
  • Loading branch information
Planlos5000 authored Jan 10, 2025
1 parent a77ed0e commit 7e85516
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY .env .

RUN yarn build

FROM nginxinc/nginx-unprivileged:1.21-alpine
FROM nginxinc/nginx-unprivileged:1.27-alpine

# Toggle visibility of cookie policy, privacy policy, and terms & conditions
ENV SCRUMLR_SHOW_LEGAL_DOCUMENTS=''
Expand All @@ -33,6 +33,7 @@ ENV SCRUMLR_LISTEN_PORT='8080'
# Analytics variables
ENV SCRUMLR_ANALYTICS_DATA_DOMAIN=''
ENV SCRUMLR_ANALYTICS_SRC=''
ENV SCRUMLR_CLARITY_ID=''

COPY ./nginx.conf /etc/nginx/templates/scrumlr.io.conf.template
COPY --from=build-stage /usr/src/app/build /usr/share/nginx/html
Expand Down
1 change: 1 addition & 0 deletions deployment/docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ SCRUMLR_SHOW_LEGAL_DOCUMENTS=true
# SCRUMLR_WEBSOCKET_URL="ws://localhost:8080/api"
# Webhook URL for feedback
WEBHOOK_URL=
SCRUMLR_CLARITY_ID=
5 changes: 3 additions & 2 deletions deployment/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.8"
services:
scrumlr-backend:
restart: always
image: ghcr.io/inovex/scrumlr.io/scrumlr-server:3.9.0
image: ghcr.io/inovex/scrumlr.io/scrumlr-server:3.10.1
command:
- "/app/main"
- "-disable-check-origin"
Expand Down Expand Up @@ -44,7 +44,7 @@ services:

scrumlr-frontend:
restart: always
image: ghcr.io/inovex/scrumlr.io/scrumlr-frontend:3.9.0
image: ghcr.io/inovex/scrumlr.io/scrumlr-frontend:3.10.1
environment:
SCRUMLR_SERVER_URL: "${SCRUMLR_SERVER_URL}"
SCRUMLR_WEBSOCKET_URL: "${SCRUMLR_WEBSOCKET_URL}"
Expand All @@ -53,6 +53,7 @@ services:
SCRUMLR_LISTEN_PORT: "${SCRUMLR_LISTEN_PORT:-8080}"
SCRUMLR_ANALYTICS_DATA_DOMAIN: "${ANALYTICS_DATA_DOMAIN}"
SCRUMLR_ANALYTICS_SRC: "${ANALYTICS_SRC}"
SCRUMLR_CLARITY_ID: "${SCRUMLR_CLARITY_ID}"
ports:
- "9090:8080"

Expand Down
6 changes: 6 additions & 0 deletions docs/src/content/docs/self-hosting/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ SCRUMLR_ANALYTICS_DATA_DOMAIN=''
SCRUMLR_ANALYTICS_SRC=''
```

### Clarity id
The clarity id to use [Clarity](https://clarity.microsoft.com/).
```bash
SCRUMLR_CLARITY_ID=''
```

## Backend

### Server Port
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ if (ANALYTICS_DATA_DOMAIN && ANALYTICS_SRC) {

const root = createRoot(document.getElementById("root") as HTMLDivElement);

// If clarity ID is set in env variables, initialize Clarity
if (CLARITY_ID) {
// If clarity ID is set and not empty in env variables, initialize Clarity
if (CLARITY_ID && CLARITY_ID !== "") {
Clarity.init(CLARITY_ID);
}

Expand Down

0 comments on commit 7e85516

Please sign in to comment.