mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
chore: update docs
This commit is contained in:
parent
8848956846
commit
3a122a3f97
@ -23,13 +23,39 @@ Once the server has started, you will see the message:
|
|||||||
Unleash started on http://localhost:4242
|
Unleash started on http://localhost:4242
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option one - from a terminal/bash shell
|
### Option one - use Docker
|
||||||
|
|
||||||
|
**Useful links:**
|
||||||
|
|
||||||
|
- [Docker image on dockerhub](https://hub.docker.com/r/unleashorg/unleash-server/)
|
||||||
|
- [Unleash Helm Chart on artifacthub](https://artifacthub.io/packages/helm/unleash/unleash)
|
||||||
|
|
||||||
|
**Steps:**
|
||||||
|
|
||||||
|
1. Create a network by running `docker network create unleash`
|
||||||
|
2. Start a postgres database:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install unleash-server -g
|
docker run -e POSTGRES_PASSWORD=some_password \
|
||||||
unleash -d postgres://unleash_user:password@localhost:5432/unleash -p 4242
|
-e POSTGRES_USER=unleash_user -e POSTGRES_DB=unleash \
|
||||||
|
--network unleash --name postgres postgres
|
||||||
```
|
```
|
||||||
|
|
||||||
|
3. Start Unleash via docker:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -p 4242:4242 \
|
||||||
|
-e DATABASE_HOST=postgres -e DATABASE_NAME=unleash \
|
||||||
|
-e DATABASE_USERNAME=unleash_user -e DATABASE_PASSWORD=some_password \
|
||||||
|
--network unleash unleashorg/unleash-server
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Docker-compose
|
||||||
|
|
||||||
|
1. Clone the [unleash-docker](https://github.com/Unleash/unleash-docker) repository.
|
||||||
|
2. Run `docker-compose build` in repository root folder.
|
||||||
|
3. Run `docker-compose up` in repository root folder.
|
||||||
|
|
||||||
### Option two - from Node.js
|
### Option two - from Node.js
|
||||||
|
|
||||||
1. Create a new folder/directory on your development computer.
|
1. Create a new folder/directory on your development computer.
|
||||||
@ -62,25 +88,13 @@ unleash -d postgres://unleash_user:password@localhost:5432/unleash -p 4242
|
|||||||
node server.js
|
node server.js
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option three - use Docker
|
### Option three - from a terminal/bash shell
|
||||||
|
|
||||||
[View the image on dockerhub](https://hub.docker.com/r/unleashorg/unleash-server/)
|
_(deprecated)_
|
||||||
|
|
||||||
#### Docker-compose
|
|
||||||
|
|
||||||
1. Clone the [unleash-docker](https://github.com/Unleash/unleash-docker) repository.
|
|
||||||
2. Run `docker-compose build` in repository root folder.
|
|
||||||
3. Run `docker-compose up` in repository root folder.
|
|
||||||
|
|
||||||
#### Manually
|
|
||||||
|
|
||||||
1. Create a network by running `docker network create unleash`
|
|
||||||
2. Run
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -e POSTGRES_PASSWORD={INSERT_PASSWORD} -e POSTGRES_USER={INSERT_USER} -e POSTGRES_DB=unleash --network unleash --name postgres postgres
|
npm install unleash-server -g
|
||||||
|
unleash -d postgres://unleash_user:password@localhost:5432/unleash -p 4242
|
||||||
docker run -p 4242:4242 --network unleash -e DATABASE_URL=postgres://{INSERT_USER}:{INSERT_PASSWORD}@postgres:5432/unleash unleashorg/unleash-server
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Test your server and create a sample API call
|
## Test your server and create a sample API call
|
||||||
|
@ -54,6 +54,14 @@ For example if you want to download just feature-toggles as yaml:
|
|||||||
/api/admin/state/export?format=yaml&featureToggles=1&strategies=0&tags=0&projects=0&download=1
|
/api/admin/state/export?format=yaml&featureToggles=1&strategies=0&tags=0&projects=0&download=1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example with curl:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl -X GET -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Basic YWRtaW46" \
|
||||||
|
http://unleash.herokuapp.com/api/admin/state/export?&featureToggles=1&strategies=0 > export.json
|
||||||
|
```
|
||||||
|
|
||||||
### API Import
|
### API Import
|
||||||
|
|
||||||
You can import feature-toggles and strategies by POSTing to the `/api/admin/state/import` endpoint (keep in mind this will require authentication).\
|
You can import feature-toggles and strategies by POSTing to the `/api/admin/state/import` endpoint (keep in mind this will require authentication).\
|
||||||
@ -78,6 +86,16 @@ POST /api/admin/state/import
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example with curl:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Basic YWRtaW46" -d @export.json \
|
||||||
|
http://localhost:4242/api/admin/state/import
|
||||||
|
```
|
||||||
|
|
||||||
|
\*) Remember to set correct token for Authorization.
|
||||||
|
|
||||||
## Startup import
|
## Startup import
|
||||||
|
|
||||||
### Import files via config parameter
|
### Import files via config parameter
|
||||||
|
@ -5,5 +5,6 @@ title: Integrations and plugins
|
|||||||
|
|
||||||
Available integrations with Unleash
|
Available integrations with Unleash
|
||||||
|
|
||||||
- [Vue plugin](https://github.com/crishellco/vue-unleash)
|
- [Vue Unleash plugin](https://github.com/crishellco/vue-unleash)
|
||||||
- [Quarkus](https://github.com/quarkiverse/quarkus-unleash)
|
- [Quarkus](https://github.com/quarkiverse/quarkus-unleash)
|
||||||
|
- [Fastify feature flags plugin](https://gitlab.com/m03geek/fastify-feature-flags#unleash-provider)
|
||||||
|
Loading…
Reference in New Issue
Block a user