-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'onboarding-page' of https://github.com/flipt-io/flipt i…
…nto onboarding-page * 'onboarding-page' of https://github.com/flipt-io/flipt: docs(examples): added example how to run flipt behind nginx (#2726) chore(deps): bump github.com/moby/buildkit in /_tools (#2728) feat: UI refs pt1 (#2727)
- Loading branch information
Showing
11 changed files
with
192 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: "3" | ||
|
||
services: | ||
flipt: | ||
image: flipt/flipt:latest | ||
environment: | ||
- FLIPT_LOG_LEVEL=warn | ||
- FLIPT_STORAGE_TYPE=local | ||
- FLIPT_STORAGE_LOCAL_PATH=/opt | ||
- FLIPT_META_TELEMETRY_ENABLED=false | ||
networks: | ||
- flipt_network | ||
volumes: | ||
- ./features.yml:/opt/features.yml:ro | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1 | ||
|
||
nginx: | ||
image: nginx:alpine | ||
ports: | ||
- "9999:80" | ||
networks: | ||
- flipt_network | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro | ||
depends_on: | ||
flipt: | ||
condition: service_healthy | ||
|
||
networks: | ||
flipt_network: |
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,5 @@ | ||
namespace: default | ||
flags: | ||
- key: example | ||
name: Example | ||
description: An example flag |
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,33 @@ | ||
server { | ||
listen 80; | ||
gzip on; | ||
gzip_static on; | ||
gzip_types text/plain text/css application/json text/javascript; | ||
location / { | ||
add_header Content-Type text/html; | ||
return 200 '<html><body style="text-align:center"><a href="/flipt/">Go to Flipt</a></body></html>'; | ||
} | ||
location /flipt { | ||
proxy_pass http://flipt:8080/; | ||
# proxy settings | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Accept-Encoding ""; | ||
proxy_buffering on; | ||
gzip on; | ||
|
||
# rewrite | ||
rewrite ^/flipt/(.*) /$1 break; | ||
|
||
# modify response | ||
sub_filter_once off; | ||
sub_filter_types text/javascript text/html; | ||
sub_filter "/favicon.svg" "/flipt/favicon.svg"; | ||
sub_filter "assets/" "flipt/assets/"; | ||
sub_filter "/api/v1" "/flipt/api/v1"; | ||
sub_filter "/auth/v1" "/flipt/auth/v1"; | ||
sub_filter "/evaluate/v1" "/flipt/evaluate/v1"; | ||
sub_filter "/meta" "/flipt/meta"; | ||
} | ||
} |
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,31 @@ | ||
import { createSelector, createSlice } from '@reduxjs/toolkit'; | ||
import { RootState } from '~/store'; | ||
|
||
export const refsKey = 'refs'; | ||
interface IRefState { | ||
currentRef?: string; | ||
} | ||
|
||
const initialState: IRefState = { | ||
currentRef: undefined | ||
}; | ||
|
||
export const refsSlice = createSlice({ | ||
name: 'refs', | ||
initialState, | ||
reducers: { | ||
currentRefChanged: (state, action) => { | ||
const ref = action.payload; | ||
state.currentRef = ref; | ||
} | ||
} | ||
}); | ||
|
||
export const { currentRefChanged } = refsSlice.actions; | ||
|
||
export const selectCurrentRef = createSelector( | ||
[(state: RootState) => state.refs.currentRef], | ||
(ref) => ref | ||
); | ||
|
||
export default refsSlice.reducer; |
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