Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ CONTRIBUTING*
# -----------------------------------------------------------------------------
.claude/
.serena/
.cursor/
.cache/
.config/

# -----------------------------------------------------------------------------
# OS files
Expand Down
16 changes: 15 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ updates:
- "*"

- package-ecosystem: "docker"
directory: "/"
directories:
- "/"
- "/local"
schedule:
interval: "monthly"
target-branch: "main"
Expand All @@ -51,3 +53,15 @@ updates:
docker:
patterns:
- "*"

- package-ecosystem: "docker-compose"
directory: "/local"
schedule:
interval: "monthly"
target-branch: "main"
cooldown:
default-days: 10
groups:
docker-compose:
patterns:
- "*"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ data/
# -----------------------------------------------------------------------------
.claude/
.serena/
docs/superpowers/

# -----------------------------------------------------------------------------
# Other
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ dev-init:
.PHONY: dev-deps
dev-deps:
@echo "Starting service dependencies..."
$(COMPOSE_CMD) up -d postgres redis redis-insight localstack adminer aspire-dashboard
@echo "Dependencies started (postgres:5432, redis:6379, redis-insight:5540, localstack/dynamodb:4566, adminer:8081, aspire-dashboard:18888)"
$(COMPOSE_CMD) up -d postgres redis redis-insight ministack adminer aspire-dashboard
@echo "Dependencies started (postgres:5432, redis:6379, redis-insight:5540, ministack/dynamodb:4566, adminer:8081, aspire-dashboard:18888)"

.PHONY: dev
dev: dev-deps
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ require (
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.20.40
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.57.4
github.com/coreos/go-oidc/v3 v3.18.0
github.com/docker/go-connections v0.7.0
github.com/ggicci/httpin v0.20.3
github.com/go-chi/chi/v5 v5.3.0
github.com/go-chi/httplog/v3 v3.3.0
Expand Down Expand Up @@ -85,6 +84,7 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.7.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/ebitengine/purego v0.10.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down
10 changes: 3 additions & 7 deletions internal/testutil/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
"github.com/docker/go-connections/nat"
"github.com/golang-migrate/migrate/v4"
migratePostgres "github.com/golang-migrate/migrate/v4/database/postgres"
"github.com/golang-migrate/migrate/v4/source/iofs"
Expand Down Expand Up @@ -104,18 +103,15 @@ func NewRedisContainer(t *testing.T) *redis.Client {
return client
}

// NewDynamoDBContainer starts a LocalStack container with DynamoDB and returns
// NewDynamoDBContainer starts a MiniStack container with DynamoDB and returns
// a connected client. It creates the standard tables (logs, rate_limits).
// The container is terminated when the test finishes.
func NewDynamoDBContainer(t *testing.T) *dynamodb.Client {
t.Helper()
ctx := context.Background()

container, err := tcLocalstack.Run(ctx,
"localstack/localstack:latest",
testcontainers.WithEnv(map[string]string{
"SERVICES": "dynamodb",
}),
"ministackorg/ministack:latest",
testcontainers.WithWaitStrategy(
wait.ForLog("Ready.").WithStartupTimeout(60*time.Second)),
)
Expand All @@ -125,7 +121,7 @@ func NewDynamoDBContainer(t *testing.T) *dynamodb.Client {
host, err := container.Host(ctx)
require.NoError(t, err)

port, err := container.MappedPort(ctx, nat.Port("4566/tcp"))
port, err := container.MappedPort(ctx, "4566/tcp")
require.NoError(t, err)

endpoint := fmt.Sprintf("http://%s:%s", host, port.Port())
Expand Down
23 changes: 11 additions & 12 deletions local/compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,19 @@ services:
redis:
condition: service_started

localstack:
image: localstack/localstack:4.14.0@sha256:3ebc37595918b8accb852f8048fef2aff047d465167edd655528065b07bc364a
container_name: gate-localstack
hostname: localstack
ministack:
image: ministackorg/ministack:1.3.66@sha256:a64f3c3bebff231aa4b6839a5ed4b0c9cffe02dc20bcee0b1b2d440dc3160cea
container_name: gate-ministack
hostname: ministack
ports:
- "4566:4566"
environment:
- SERVICES=dynamodb
- DEBUG=0
volumes:
- ./.volumes/localstack:/var/lib/localstack
- ./localstack-init.sh:/etc/localstack/init/ready.d/init.sh:ro
- ./.volumes/ministack:/var/lib/ministack
- ./ministack-init.sh:/etc/localstack/init/ready.d/init.sh:ro
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:4566/_localstack/health || exit 1"]
test: ["CMD", "nc", "-z", "-w", "1", "127.0.0.1", "4566"]
interval: 15s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -102,7 +101,7 @@ services:
entrypoint: ["sh", "-c", "go run . -c ${CONFIG_FILE:-config.yaml} db migrate up"]
environment:
- CONFIG_FILE=${CONFIG_FILE:-config.yaml}
- AWS_ENDPOINT_URL=http://localstack:4566
- AWS_ENDPOINT_URL=http://ministack:4566
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_DEFAULT_REGION=us-east-1
Expand All @@ -111,7 +110,7 @@ services:
depends_on:
postgres:
condition: service_healthy
localstack:
ministack:
condition: service_healthy

aspire-dashboard:
Expand Down Expand Up @@ -151,7 +150,7 @@ services:
environment:
- HOME=/tmp
- CONFIG_FILE=${CONFIG_FILE:-config.yaml}
- AWS_ENDPOINT_URL=http://localstack:4566
- AWS_ENDPOINT_URL=http://ministack:4566
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_DEFAULT_REGION=us-east-1
Expand All @@ -168,7 +167,7 @@ services:
condition: service_healthy
redis:
condition: service_started
localstack:
ministack:
condition: service_healthy
migrate:
condition: service_completed_successfully
Expand Down
File renamed without changes.
Loading