Run Gopherstack as a container with a single command — no Go toolchain required.
docker run --rm -p 8000:8000 ghcr.io/blackbirdworks/gopherstack:latestVerify it is running:
curl http://localhost:8000/health
# {"status":"ok"}The repository ships a ready-to-use docker-compose.yml:
services:
gopherstack:
image: ghcr.io/blackbirdworks/gopherstack:latest
environment:
- PERSIST=true
- DEMO=false
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "./gopherstack", "health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
volumes:
- gopherstack-data:/data
volumes:
gopherstack-data:Start it:
docker compose up -d
docker compose ps # check status
docker compose logs -f # follow logsexport AWS_ENDPOINT_URL=http://localhost:8000
export AWS_ACCESS_KEY_ID=test
export AWS_SECRET_ACCESS_KEY=test
export AWS_DEFAULT_REGION=us-east-1
aws s3 mb s3://test-bucket
aws sqs create-queue --queue-name my-queue
aws dynamodb list-tablesCustomise the container with environment variables:
environment:
- PORT=8000
- REGION=eu-west-1
- ACCOUNT_ID=123456789012
- PERSIST=true
- DEMO=true
- LOG_LEVEL=debug
- LATENCY_MS=50 # inject up to 50 ms of random latency
- ELASTICACHE_ENGINE=embeddedState snapshots are written to /data inside the container. Mount a named volume or host path to keep state across container restarts:
volumes:
- gopherstack-data:/data # named volume (shown above)
- ./local-data:/data # host pathCombine Gopherstack with your application in a single Compose file:
services:
gopherstack:
image: ghcr.io/blackbirdworks/gopherstack:latest
environment:
- PERSIST=true
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "./gopherstack", "health"]
interval: 10s
retries: 3
volumes:
- gs-data:/data
app:
build: .
environment:
- AWS_ENDPOINT_URL=http://gopherstack:8000
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_DEFAULT_REGION=us-east-1
depends_on:
gopherstack:
condition: service_healthy
volumes:
gs-data:jobs:
test:
runs-on: ubuntu-latest
services:
gopherstack:
image: ghcr.io/blackbirdworks/gopherstack:latest
ports:
- "8000:8000"
options: >-
--health-cmd "./gopherstack health"
--health-interval 10s
--health-retries 3
steps:
- uses: actions/checkout@v4
- name: Run tests
env:
AWS_ENDPOINT_URL: http://localhost:8000
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
run: go test ./...git clone https://github.com/blackbirdworks/gopherstack
cd gopherstack
docker build -t gopherstack:local .
docker run --rm -p 8000:8000 gopherstack:localLambda image-based functions require the Docker daemon. When running Gopherstack itself inside Docker, you need to mount the host Docker socket and set LAMBDA_DOCKER_HOST to the host IP:
services:
gopherstack:
image: ghcr.io/blackbirdworks/gopherstack:latest
environment:
- LAMBDA_DOCKER_HOST=host-gateway # or your host IP
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- gs-data:/data
ports:
- "8000:8000"See Lambda architecture for details.