From 5ebcc6a703ed98ac4b7dfb6052519ebdc3f4b25c Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Fri, 29 Jul 2022 09:56:36 -0400 Subject: [PATCH] Add redis example; update/add logos (#968) * Add redis example; update/add logos * Smaller tech logos --- README.md | 37 ++++++++++++------ examples/mysql/README.md | 4 ++ examples/postgres/README.md | 4 ++ examples/prometheus/README.md | 4 ++ examples/redis/Dockerfile | 8 ++++ examples/redis/README.md | 36 +++++++++++++++++ examples/redis/docker-compose.yml | 27 +++++++++++++ logos/mysql.svg | 1 + logos/postgresql.svg | 1 + logos/prometheus.svg | 1 + logos/redis.svg | 1 + logos/sqlite.svg | 1 + .../paradigm.png} | Bin logos/{ => users}/rokt.svg | 0 14 files changed, 113 insertions(+), 12 deletions(-) create mode 100644 examples/redis/Dockerfile create mode 100644 examples/redis/README.md create mode 100644 examples/redis/docker-compose.yml create mode 100644 logos/mysql.svg create mode 100644 logos/postgresql.svg create mode 100644 logos/prometheus.svg create mode 100644 logos/redis.svg create mode 100644 logos/sqlite.svg rename logos/{paradigm-logo-light-vertical-128x128.png => users/paradigm.png} (100%) rename logos/{ => users}/rokt.svg (100%) diff --git a/README.md b/README.md index 58b50637fe..4d038825c7 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,16 @@ Flipt supports use cases such as: - :white_check_mark: **Simplicity** - Flipt is a single binary with no external dependencies by default. - :thumbsup: **Compatibility** - REST, GRPC, MySQL, Postgres, SQLite, Redis.. Flipt supports it all. +## Works With + +

+ SQLite + MySQL + PostgreSQL + Redis + Prometheus +

+ ## Try It Try the latest version of Flipt out for yourself. @@ -99,6 +109,21 @@ Flipt UI will now be reachable at [http://127.0.0.1:8080/](http://127.0.0.1:8080 For more permanent methods of running Flipt, see the [Installation](https://flipt.io/docs/installation/) section. +## Logos + +Some of our users running Flipt in production. + +

+ + Paradigm + + + Rokt + +

+ +Using Flipt at your company? Open a PR and add your logo here! + ## Integration Checkout the [integration docs](https://flipt.io/docs/integration/) for more info on how to integrate Flipt into your existing application. @@ -160,18 +185,6 @@ The server code is licensed under the [GPL 3.0 License](https://spdx.org/license See [LICENSE](LICENSE). -## Logos - -| [![Paradigm](logos/paradigm-logo-light-vertical-128x128.png)](https://www.paradigm.co/) | -| ------------------------------------------------------------------------------------------| -| [Paradigm](https://www.paradigm.co/) | - -| | -| ------------------------------------------------------------------------------------------| -| [Rokt](https://www.rokt.com/) | - -Using Flipt at your company? Open a PR and add your logo here! - ## Sponsors If you use Flipt at your company, please consider [becoming a sponsor](https://github.com/sponsors/markphelps) today. diff --git a/examples/mysql/README.md b/examples/mysql/README.md index 7f9c2dd394..70fb12c8a5 100644 --- a/examples/mysql/README.md +++ b/examples/mysql/README.md @@ -1,3 +1,7 @@ +

+ MySQL +

+ # MySQL Example This example shows how you can run Flipt with a MySQL database over the default SQLite. diff --git a/examples/postgres/README.md b/examples/postgres/README.md index a756a21088..806111505f 100644 --- a/examples/postgres/README.md +++ b/examples/postgres/README.md @@ -1,3 +1,7 @@ +

+ Postgres +

+ # Postgres Example This example shows how you can run Flipt with a Postgres database over the default SQLite. diff --git a/examples/prometheus/README.md b/examples/prometheus/README.md index c24be3dac3..9789d836ec 100644 --- a/examples/prometheus/README.md +++ b/examples/prometheus/README.md @@ -1,3 +1,7 @@ +

+ Prometheus +

+ # Prometheus Example This example shows how you can run Flipt with a Prometheus sidecar application in Docker. diff --git a/examples/redis/Dockerfile b/examples/redis/Dockerfile new file mode 100644 index 0000000000..9945c94957 --- /dev/null +++ b/examples/redis/Dockerfile @@ -0,0 +1,8 @@ +FROM flipt/flipt:latest + +USER root + +RUN apk update && apk add --no-cache git bash + +RUN git clone https://github.com/vishnubob/wait-for-it.git /tmp && \ + chmod +x /tmp/wait-for-it.sh diff --git a/examples/redis/README.md b/examples/redis/README.md new file mode 100644 index 0000000000..fff815106d --- /dev/null +++ b/examples/redis/README.md @@ -0,0 +1,36 @@ +

+ Redis +

+ +# Redis Example + +This example shows how you can run Flipt with a Redis cache for caching flag and evaluation responses. + +This works by setting the following environment variables to configure Redis in the container: + +```bash +FLIPT_CACHE_ENABLED=true +FLIPT_CACHE_TTL=60s +FLIPT_CACHE_BACKEND=redis +FLIPT_CACHE_REDIS_HOST=redis +FLIPT_CACHE_REDIS_PORT=6379 +``` + +For more information on how to use Redis with Flipt, see the [Flipt caching documentation](https://flipt.io/docs/configuration#caching). + +## Requirements + +To run this example application you'll need: + +* [Docker](https://docs.docker.com/install/) +* [docker-compose](https://docs.docker.com/compose/install/) + +## Running the Example + +1. Run `docker-compose up` from this directory +1. Open the Flipt UI (default: [http://localhost:8080](http://localhost:8080)) +1. Check the logs to see that the Redis cache is enabled: + + ```console + level=debug msg="cache: \"redis\" enabled" server=grpc + ``` diff --git a/examples/redis/docker-compose.yml b/examples/redis/docker-compose.yml new file mode 100644 index 0000000000..5efc0e9475 --- /dev/null +++ b/examples/redis/docker-compose.yml @@ -0,0 +1,27 @@ +version: "3" + +services: + redis: + image: redis:latest + networks: + - flipt_network + + flipt: + build: . + depends_on: + - redis + ports: + - "8080:8080" + networks: + - flipt_network + environment: + - FLIPT_CACHE_ENABLED=true + - FLIPT_CACHE_TTL=60s + - FLIPT_CACHE_BACKEND=redis + - FLIPT_CACHE_REDIS_HOST=redis + - FLIPT_CACHE_REDIS_PORT=6379 + - FLIPT_LOG_LEVEL=debug + command: ["./tmp/wait-for-it.sh", "redis:6379", "--", "./flipt"] + +networks: + flipt_network: diff --git a/logos/mysql.svg b/logos/mysql.svg new file mode 100644 index 0000000000..853c55f150 --- /dev/null +++ b/logos/mysql.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logos/postgresql.svg b/logos/postgresql.svg new file mode 100644 index 0000000000..ae38cff586 --- /dev/null +++ b/logos/postgresql.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logos/prometheus.svg b/logos/prometheus.svg new file mode 100644 index 0000000000..8cd71f77ae --- /dev/null +++ b/logos/prometheus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logos/redis.svg b/logos/redis.svg new file mode 100644 index 0000000000..b681d424a0 --- /dev/null +++ b/logos/redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logos/sqlite.svg b/logos/sqlite.svg new file mode 100644 index 0000000000..670aa6eb82 --- /dev/null +++ b/logos/sqlite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logos/paradigm-logo-light-vertical-128x128.png b/logos/users/paradigm.png similarity index 100% rename from logos/paradigm-logo-light-vertical-128x128.png rename to logos/users/paradigm.png diff --git a/logos/rokt.svg b/logos/users/rokt.svg similarity index 100% rename from logos/rokt.svg rename to logos/users/rokt.svg