-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add redis example; update/add logos (#968)
* Add redis example; update/add logos * Smaller tech logos
- Loading branch information
1 parent
550b5f5
commit 5ebcc6a
Showing
14 changed files
with
113 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<p align="center"> | ||
<img src="../../logos/redis.svg" alt="Redis" width=250 height=250 /> | ||
</p> | ||
|
||
# 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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.