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
FROM golang:1.20-bookworm AS builder | |
WORKDIR /build | |
ENV \ | |
GOOS=linux \ | |
GOARCH=amd64 \ | |
CGO_ENABLED=0 \ | |
GOCACHE=/go-build-cache \ | |
GOMODCACHE=/go-mod-cache | |
COPY . . | |
ARG VERSION |
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
#!/bin/sh | |
# Usage: | |
# docker-layers-diff image-1 image-2 | |
set -e | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "Missing 1 / 2 args" | |
exit 1 |
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
# 1. Set IPTABLES_RESTORE_NOFLUSH=yes in /etc/default/netfilter-persistent | |
# 2. Put contents of that file in /etc/iptables/rules.v4 | |
# 3. Apply this file now and after each reboot by running: systemctl enable --now iptables.service | |
# 4. You can also apply this file directlry using: iptables-restore --noflush < /etc/iptables/rules.v4 | |
*filter | |
################################################# | |
############# INPUT chain ############# | |
################################################# |
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
{{ define "__discord_subject" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ if gt (.Alerts.Resolved | len) 0 }}, RESOLVED:{{ .Alerts.Resolved | len }}{{ end }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names }}{{ .Values | join " " }}{{ end }}){{ end }}{{ end }} | |
{{ define "__discord_values_list" }}{{ if len .Values }}{{ $first := true }}{{ range $refID, $value := .Values -}} | |
{{ if $first }}{{ $first = false }}{{ else }}, {{ end }}{{ $refID }}={{ $value }}{{ end -}} | |
{{ else }}[no value]{{ end }}{{ end }} | |
{{ define "__discord_alert_list" }} | |
{{ range . -}} | |
Value: {{ template "__discord_values_list" . }} | |
{{ if len .Labels -}} |
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
version: "3.8" | |
services: | |
my-app: | |
image: nginx:1.25.2 | |
ngrok: | |
image: ngrok/ngrok:3.3.5-alpine | |
command: | |
- http |
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
services: | |
prometheus-proxy: | |
image: quay.io/oauth2-proxy/oauth2-proxy:v7.5.0 | |
command: | |
- --http-address=:4180 | |
- --upstream=http://prometheus:9090 | |
- --email-domain=* | |
- --oidc-issuer-url=https://gitlab.com | |
- --provider=gitlab | |
- --redirect-url=http://prometheus-oauth.localhost/oauth2/callback |
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
global: | |
scrape_interval: 10s | |
scrape_configs: | |
- job_name: docker_sd | |
docker_sd_configs: | |
- host: unix:///var/run/docker.sock | |
refresh_interval: 10s |
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
version: "3.8" | |
services: | |
prometheus: | |
image: prom/prometheus:v2.45.0 | |
command: | |
- "--web.enable-admin-api" | |
ports: | |
- "9090:9090" | |
volumes: |
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
#cloud-config | |
users: | |
- name: alex | |
groups: sudo, docker | |
shell: /bin/bash | |
lock_passwd: false | |
# mkpasswd --method=SHA-512 --rounds=4096 | |
passwd: "$6$rounds=4096$liX9KRchDIBKuoXt$LqW34rkz2k3yB/MmSPL4SbvGmO0xg7sQKgnwkTAhTV6RjvZAOJS9G4iURlkJS63TRt.ThpE9Thy9G/1.JwXDC0" | |
ssh_authorized_keys: |
NewerOlder