Skip to content

Instantly share code, notes, and snippets.

@wallyqs
wallyqs / readme.md
Created July 15, 2023 04:10
JetStream on Docker with Docker Compose

First, create a few volumes so that state is persisted across restarts:

docker volume create nats1
docker volume create nats2
docker volume create nats3

Now create a docker-compose.yaml with the following:

@michaelboke
michaelboke / Dockerfile
Last active October 17, 2024 06:30
Docker scratch x509 fix
FROM golang:alpine as builder
WORKDIR /app
#the following 2 steps are optional if your image does not already have the certificate
# package installed, golang:alpine now seems to have it. But a more base image could be missing it.
#RUN apk update && apk upgrade && apk add --no-cache ca-certificates
#RUN update-ca-certificates
ADD main.go /app/main.go
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o app .
FROM scratch
@jed
jed / deploy.sh
Last active April 24, 2024 15:45
Using AWS CloudFormation to deploy an edge lambda
#!/bin/sh
aws cloudformation deploy \
--template-file stack.yaml \
--stack-name edge-lambda-test \
--capabilities CAPABILITY_IAM \
--parameter-overrides Nonce=$RANDOM
@obohrer
obohrer / gist:2049698
Created March 16, 2012 11:37
Heap dump with jmap / Stack trace
#Heap dump
jmap -dump:format=b,file=heapdump.b pid
#Just stacktraces
jstack pid