Skip to content

Commit

Permalink
docs: update documentation and dev server use of passord (#3564)
Browse files Browse the repository at this point in the history
## About the changes
Update `passord` documentation with `password`. Note this was not a typo
but just Norwegian:
https://dictionary.cambridge.org/dictionary/english-norwegian/password
```shell
grep passord * -R -l | grep -v .git | grep -v dist | grep -v v3 | xargs sed -i 's/passord/password/g'
```
The script above avoids updating v3 because of legacy reasons

Related to #1265
  • Loading branch information
gastonfournier committed Apr 19, 2023
1 parent 833d283 commit 0e80484
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -86,7 +86,7 @@ You'll need:
```bash
docker run \
-e POSTGRES_USER=unleash_user \
-e POSTGRES_PASSWORD=passord \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=unleash \
--name postgres \
-p 5432:5432 \
Expand Down Expand Up @@ -119,7 +119,7 @@ You'll need:
3. Start a Postgres database. Make sure to use the network you created in step 2.

```sh
docker run -e POSTGRES_PASSWORD=passord \
docker run -e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=unleash_user -e POSTGRES_DB=unleash \
--network unleash --name postgres postgres
```
Expand All @@ -129,7 +129,7 @@ docker run -e POSTGRES_PASSWORD=passord \
```sh
docker run -p 4242:4242 \
-e DATABASE_HOST=postgres -e DATABASE_NAME=unleash \
-e DATABASE_USERNAME=unleash_user -e DATABASE_PASSWORD=passord \
-e DATABASE_USERNAME=unleash_user -e DATABASE_PASSWORD=password \
-e DATABASE_SSL=false \
--network unleash unleash:local
```
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker-compose.yml
Expand Up @@ -5,7 +5,7 @@ services:
image: postgres:alpine3.15
environment:
POSTGRES_USER: unleash_user
POSTGRES_PASSWORD: passord
POSTGRES_PASSWORD: password
POSTGRES_DB: unleash
ports:
- 5432:5432
Expand Down
2 changes: 1 addition & 1 deletion src/server-dev.ts
Expand Up @@ -9,7 +9,7 @@ process.nextTick(async () => {
createConfig({
db: {
user: 'unleash_user',
password: 'passord',
password: 'password',
host: 'localhost',
port: 5432,
database: process.env.UNLEASH_DATABASE_NAME || 'unleash',
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2e/helpers/database-config.ts
Expand Up @@ -3,6 +3,6 @@ import parseDbUrl from 'parse-database-url';
export const getDbConfig = (): object => {
const url =
process.env.TEST_DATABASE_URL ||
'postgres://unleash_user:passord@localhost:5432/unleash_test';
'postgres://unleash_user:password@localhost:5432/unleash_test';
return parseDbUrl(url);
};
10 changes: 5 additions & 5 deletions website/docs/contributing/backend/overview.md
Expand Up @@ -33,7 +33,7 @@ Unleash currently also work with PostgreSQL v12+, but this might change in a fut

```bash
$ psql postgres <<SQL
CREATE USER unleash_user WITH PASSWORD 'passord';
CREATE USER unleash_user WITH PASSWORD 'password';
CREATE DATABASE unleash;
GRANT ALL PRIVILEGES ON DATABASE unleash to unleash_user;
CREATE DATABASE unleash_test;
Expand All @@ -42,15 +42,15 @@ ALTER DATABASE unleash_test SET timezone TO 'UTC';
SQL
```

> Password is intentionally set to 'passord', which is the Norwegian word for password.
> Password is intentionally set to 'password', which is the Norwegian word for password.
Then set env vars:

(Optional as unleash will assume these as default values).

```
export DATABASE_URL=postgres://unleash_user:passord@localhost:5432/unleash
export TEST_DATABASE_URL=postgres://unleash_user:passord@localhost:5432/unleash_test
export DATABASE_URL=postgres://unleash_user:password@localhost:5432/unleash
export TEST_DATABASE_URL=postgres://unleash_user:password@localhost:5432/unleash_test
```

## PostgreSQL with docker {#postgresql-with-docker}
Expand Down Expand Up @@ -86,7 +86,7 @@ We use database migrations to track database changes. Never change a migration t

To run migrations, you will set the environment variable for DATABASE_URL

`export DATABASE_URL=postgres://unleash_user:passord@localhost:5432/unleash`
`export DATABASE_URL=postgres://unleash_user:password@localhost:5432/unleash`

Use db-migrate to create new migrations file.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/reference/deploy/configuring-unleash.md
Expand Up @@ -38,7 +38,7 @@ const unleash = require('unleash-server');
const unleashOptions = {
db: {
user: 'unleash_user',
password: 'passord',
password: 'password',
host: 'localhost',
port: 5432,
database: 'unleash',
Expand Down Expand Up @@ -231,7 +231,7 @@ The available options are listed in the table below. Options can be specified ei
| Property name | Environment variable | Default value | Description |
| --- | --- | --- | --- |
| `user` | `DATABASE_USERNAME` | `unleash_user` | The database username. |
| `password` | `DATABASE_PASSWORD` | `passord` | The database password. |
| `password` | `DATABASE_PASSWORD` | `password` | The database password. |
| `host` | `DATABASE_HOST` | `localhost` | The database hostname. |
| `port` | `DATABASE_PORT` | `5432` | The database port. |
| `database` | `DATABASE_NAME` | `unleash` | The name of the database. |
Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/deploy/securing-unleash.md
Expand Up @@ -29,7 +29,7 @@ const myCustomAdminAuth = require('./auth-hook');

unleash
.start({
databaseUrl: 'postgres://unleash_user:passord@localhost:5432/unleash',
databaseUrl: 'postgres://unleash_user:password@localhost:5432/unleash',
authentication: {
type: 'custom',
customAuthHandler: myCustomAdminAuth,
Expand Down

0 comments on commit 0e80484

Please sign in to comment.