diff --git a/docs/deploy/getting-started.md b/docs/deploy/getting-started.md index 60463c7fd6..ace15330c5 100644 --- a/docs/deploy/getting-started.md +++ b/docs/deploy/getting-started.md @@ -23,13 +23,39 @@ Once the server has started, you will see the message: 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 -npm install unleash-server -g -unleash -d postgres://unleash_user:password@localhost:5432/unleash -p 4242 +docker run -e POSTGRES_PASSWORD=some_password \ + -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 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 ``` -### Option three - use Docker +### Option three - from a terminal/bash shell -[View the image on dockerhub](https://hub.docker.com/r/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. - -#### Manually - -1. Create a network by running `docker network create unleash` -2. Run +_(deprecated)_ ```sh -docker run -e POSTGRES_PASSWORD={INSERT_PASSWORD} -e POSTGRES_USER={INSERT_USER} -e POSTGRES_DB=unleash --network unleash --name postgres postgres - -docker run -p 4242:4242 --network unleash -e DATABASE_URL=postgres://{INSERT_USER}:{INSERT_PASSWORD}@postgres:5432/unleash unleashorg/unleash-server +npm install unleash-server -g +unleash -d postgres://unleash_user:password@localhost:5432/unleash -p 4242 ``` ## Test your server and create a sample API call diff --git a/docs/deploy/import-export.md b/docs/deploy/import-export.md index 0163e90769..37b461d1a1 100644 --- a/docs/deploy/import-export.md +++ b/docs/deploy/import-export.md @@ -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 ``` +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 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 ### Import files via config parameter diff --git a/docs/integrations/integrations.md b/docs/integrations/integrations.md index 16ea28fc61..9639f0f3f1 100644 --- a/docs/integrations/integrations.md +++ b/docs/integrations/integrations.md @@ -5,5 +5,6 @@ title: Integrations and plugins 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) +- [Fastify feature flags plugin](https://gitlab.com/m03geek/fastify-feature-flags#unleash-provider)