This file contains hidden or 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
# | |
# INPUT - Logstash listens on port 8514 for these logs. | |
# | |
input { | |
udp { | |
port => "8514" | |
type => "syslog-cisco" | |
} | |
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: echoserver | |
name: echoserver | |
namespace: test-rabbitmq | |
spec: | |
replicas: 1 | |
selector: |
This file contains hidden or 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
# STEP 1 build executable binary | |
FROM golang:alpine as builder | |
COPY . $GOPATH/src/ | |
WORKDIR $GOPATH/src/ | |
#add git to builder image | |
RUN apk update && apk add git | |
#get dependancies | |
RUN go get -d -v | |
#build the binary | |
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/gocalc |
This file contains hidden or 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/bash | |
# | |
# Backup a Postgresql database into a daily file. | |
# | |
BACKUP_DIR="/var/lib/pgsql/11/backups" | |
DAYS_TO_KEEP=2 | |
FILE_SUFFIX=_pg_backup.sql | |
DB=$(psql -t -c "SELECT datname FROM pg_database WHERE datistemplate = false;" | sed -e 's/^[[:space:]]*//' ) | |
USER=postgres |