Skip to content

Commit

Permalink
chore(wip): webhooks template example
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Oct 2, 2023
1 parent dbd5a1a commit 755c743
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/audit/webhook/docker-compose.template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3"

services:
flipt:
image: flipt/flipt:latest
command:
["./flipt", "--force-migrate", "--config", "/etc/flipt/flipt.config.yml"]
ports:
- "8080:8080"
volumes:
- ./flipt.config.yml:/etc/flipt/flipt.config.yml

networks:
- flipt_network

webhook:
build: .
networks:
- flipt_network

networks:
flipt_network:
21 changes: 21 additions & 0 deletions examples/audit/webhook/flipt.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/flipt-io/flipt/main/config/flipt.schema.json
log:
level: debug

audit:
events:
- flag:created
- flag:updated
sinks:
webhook:
enabled: true
templates:
- url: http://webhook:8081/
method: POST
headers:
Content-Type: application/json
body: |
{
"event": "{{ .Type }} {{ .Action }}",
"timestamp": "{{ .Timestamp }}"
}

0 comments on commit 755c743

Please sign in to comment.