mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
docs: update documentation and dev server use of passord (#3564)
## 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
This commit is contained in:
parent
833d283004
commit
0e80484068
@ -86,7 +86,7 @@ You'll need:
|
|||||||
```bash
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
-e POSTGRES_USER=unleash_user \
|
-e POSTGRES_USER=unleash_user \
|
||||||
-e POSTGRES_PASSWORD=passord \
|
-e POSTGRES_PASSWORD=password \
|
||||||
-e POSTGRES_DB=unleash \
|
-e POSTGRES_DB=unleash \
|
||||||
--name postgres \
|
--name postgres \
|
||||||
-p 5432:5432 \
|
-p 5432:5432 \
|
||||||
@ -119,7 +119,7 @@ You'll need:
|
|||||||
3. Start a Postgres database. Make sure to use the network you created in step 2.
|
3. Start a Postgres database. Make sure to use the network you created in step 2.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -e POSTGRES_PASSWORD=passord \
|
docker run -e POSTGRES_PASSWORD=password \
|
||||||
-e POSTGRES_USER=unleash_user -e POSTGRES_DB=unleash \
|
-e POSTGRES_USER=unleash_user -e POSTGRES_DB=unleash \
|
||||||
--network unleash --name postgres postgres
|
--network unleash --name postgres postgres
|
||||||
```
|
```
|
||||||
@ -129,7 +129,7 @@ docker run -e POSTGRES_PASSWORD=passord \
|
|||||||
```sh
|
```sh
|
||||||
docker run -p 4242:4242 \
|
docker run -p 4242:4242 \
|
||||||
-e DATABASE_HOST=postgres -e DATABASE_NAME=unleash \
|
-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 \
|
-e DATABASE_SSL=false \
|
||||||
--network unleash unleash:local
|
--network unleash unleash:local
|
||||||
```
|
```
|
||||||
|
@ -5,7 +5,7 @@ services:
|
|||||||
image: postgres:alpine3.15
|
image: postgres:alpine3.15
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: unleash_user
|
POSTGRES_USER: unleash_user
|
||||||
POSTGRES_PASSWORD: passord
|
POSTGRES_PASSWORD: password
|
||||||
POSTGRES_DB: unleash
|
POSTGRES_DB: unleash
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
@ -9,7 +9,7 @@ process.nextTick(async () => {
|
|||||||
createConfig({
|
createConfig({
|
||||||
db: {
|
db: {
|
||||||
user: 'unleash_user',
|
user: 'unleash_user',
|
||||||
password: 'passord',
|
password: 'password',
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: 5432,
|
port: 5432,
|
||||||
database: process.env.UNLEASH_DATABASE_NAME || 'unleash',
|
database: process.env.UNLEASH_DATABASE_NAME || 'unleash',
|
||||||
|
@ -3,6 +3,6 @@ import parseDbUrl from 'parse-database-url';
|
|||||||
export const getDbConfig = (): object => {
|
export const getDbConfig = (): object => {
|
||||||
const url =
|
const url =
|
||||||
process.env.TEST_DATABASE_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);
|
return parseDbUrl(url);
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,7 @@ Unleash currently also work with PostgreSQL v12+, but this might change in a fut
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ psql postgres <<SQL
|
$ psql postgres <<SQL
|
||||||
CREATE USER unleash_user WITH PASSWORD 'passord';
|
CREATE USER unleash_user WITH PASSWORD 'password';
|
||||||
CREATE DATABASE unleash;
|
CREATE DATABASE unleash;
|
||||||
GRANT ALL PRIVILEGES ON DATABASE unleash to unleash_user;
|
GRANT ALL PRIVILEGES ON DATABASE unleash to unleash_user;
|
||||||
CREATE DATABASE unleash_test;
|
CREATE DATABASE unleash_test;
|
||||||
@ -42,15 +42,15 @@ ALTER DATABASE unleash_test SET timezone TO 'UTC';
|
|||||||
SQL
|
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:
|
Then set env vars:
|
||||||
|
|
||||||
(Optional as unleash will assume these as default values).
|
(Optional as unleash will assume these as default values).
|
||||||
|
|
||||||
```
|
```
|
||||||
export DATABASE_URL=postgres://unleash_user:passord@localhost:5432/unleash
|
export DATABASE_URL=postgres://unleash_user:password@localhost:5432/unleash
|
||||||
export TEST_DATABASE_URL=postgres://unleash_user:passord@localhost:5432/unleash_test
|
export TEST_DATABASE_URL=postgres://unleash_user:password@localhost:5432/unleash_test
|
||||||
```
|
```
|
||||||
|
|
||||||
## PostgreSQL with docker {#postgresql-with-docker}
|
## PostgreSQL with docker {#postgresql-with-docker}
|
||||||
@ -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
|
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.
|
Use db-migrate to create new migrations file.
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ const unleash = require('unleash-server');
|
|||||||
const unleashOptions = {
|
const unleashOptions = {
|
||||||
db: {
|
db: {
|
||||||
user: 'unleash_user',
|
user: 'unleash_user',
|
||||||
password: 'passord',
|
password: 'password',
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: 5432,
|
port: 5432,
|
||||||
database: 'unleash',
|
database: 'unleash',
|
||||||
@ -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 |
|
| Property name | Environment variable | Default value | Description |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| `user` | `DATABASE_USERNAME` | `unleash_user` | The database username. |
|
| `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. |
|
| `host` | `DATABASE_HOST` | `localhost` | The database hostname. |
|
||||||
| `port` | `DATABASE_PORT` | `5432` | The database port. |
|
| `port` | `DATABASE_PORT` | `5432` | The database port. |
|
||||||
| `database` | `DATABASE_NAME` | `unleash` | The name of the database. |
|
| `database` | `DATABASE_NAME` | `unleash` | The name of the database. |
|
||||||
|
@ -29,7 +29,7 @@ const myCustomAdminAuth = require('./auth-hook');
|
|||||||
|
|
||||||
unleash
|
unleash
|
||||||
.start({
|
.start({
|
||||||
databaseUrl: 'postgres://unleash_user:passord@localhost:5432/unleash',
|
databaseUrl: 'postgres://unleash_user:password@localhost:5432/unleash',
|
||||||
authentication: {
|
authentication: {
|
||||||
type: 'custom',
|
type: 'custom',
|
||||||
customAuthHandler: myCustomAdminAuth,
|
customAuthHandler: myCustomAdminAuth,
|
||||||
|
Loading…
Reference in New Issue
Block a user