Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ HTTPS_PORT=443
# SENTRY_PROJECT=
# SENTRY_TRACE_RATE=

# Optional: configure frontend error reporting
# ODK_CENTRAL_FRONTEND_SENTRY_DSN=

# Optional: configure S3-compatible storage for binary files
# S3_SERVER=
# S3_ACCESS_KEY=
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ This repository serves administrative functions, but it also contains the Docker

To learn how to run such a stack in production, please take a look at [our DigitalOcean installation guide](https://docs.getodk.org/central-install-digital-ocean/).

### Sentry (optional)

To enable frontend error reporting and performance monitoring via Sentry, set `ODK_CENTRAL_FRONTEND_SENTRY_DSN` in your `.env` file (see `.env.template`) and restart:

```sh
docker compose up -d
```

Deployments that omit this variable are unaffected — Sentry will remain disabled.

## Node.js version

We aim to use the latest [active LTS version of Node.js](https://github.com/nodejs/release/blob/main/README.md#release-schedule). This means that we generally update the major Node version used across all Central components once a year. Each time we do a Central release, we update to the latest version within the active LTS line. Node updates are done near the end of the release cycle but before regression testing.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ services:
- SENTRY_KEY=${SENTRY_KEY:-3cf75f54983e473da6bd07daddf0d2ee}
- SENTRY_PROJECT=${SENTRY_PROJECT:-1298632}
- OIDC_ENABLED=${OIDC_ENABLED:-false}
- ODK_CENTRAL_FRONTEND_SENTRY_DSN=${ODK_CENTRAL_FRONTEND_SENTRY_DSN:-}
volumes:
- ./files/local/customssl/:/etc/customssl/live/local/:ro
- ./files/nginx/odk.conf.template:/usr/share/odk/nginx/odk.conf.template:ro
Expand Down
3 changes: 2 additions & 1 deletion files/nginx/client-config.json.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"oidcEnabled": ${OIDC_ENABLED}
"oidcEnabled": ${OIDC_ENABLED},
"sentryDsn": "${ODK_CENTRAL_FRONTEND_SENTRY_DSN}"
}
1 change: 1 addition & 0 deletions test/nginx/lib.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- SENTRY_ORG_SUBDOMAIN=o-fake-dsn
- SENTRY_PROJECT=example-sentry-project
- OIDC_ENABLED=false
- ODK_CENTRAL_FRONTEND_SENTRY_DSN=https://fake-dsn.fake-sentry
volumes:
- ../../files/nginx/odk.conf.template:/usr/share/odk/nginx/odk.conf.template:ro
- ../../files/nginx/client-config.json.template:/usr/share/odk/nginx/client-config.json.template:ro
Expand Down
4 changes: 2 additions & 2 deletions test/nginx/src/mocha/nginx.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function standardTestSuite({ fetchHttp, fetchHttp6, apiFetch, apiFetch6, forward

// then
assert.equal(res.status, 200);
assert.deepEqual(await res.json(), { oidcEnabled: false });
assert.deepEqual(await res.json(), { oidcEnabled: false, sentryDsn: 'https://fake-dsn.fake-sentry' });
assertSecurityHeaders(res, { csp:'central-frontend' });
});

Expand All @@ -452,7 +452,7 @@ function standardTestSuite({ fetchHttp, fetchHttp6, apiFetch, apiFetch6, forward

// then
assert.equal(res.status, 200);
assert.deepEqual(await res.json(), { oidcEnabled: false });
assert.deepEqual(await res.json(), { oidcEnabled: false, sentryDsn: 'https://fake-dsn.fake-sentry' });
assertSecurityHeaders(res, { csp:'central-frontend' });
});

Expand Down
Loading