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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM golang:1.24-alpine3.21 AS builder
FROM golang:1.24-alpine3.21@sha256:a57b286438c2b1503d639cb0c8e170b6a72f46de3fad72d0e00fc1c3383ab952 AS builder

# Install build dependencies (with retry logic for network issues)
RUN apk update && apk add --no-cache git make || \
Expand All @@ -25,7 +25,7 @@ RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest && \
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o embapi main.go

# Runtime stage
FROM alpine:3.21
FROM alpine:3.21@sha256:7e6b9fa64f522478522f563b3180b58e98f55b4ffc0dccabc1855371467ec67d

# Update package index and install ca-certificates for HTTPS (with retry logic)
RUN apk update && apk add --no-cache ca-certificates wget || \
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
# PostgreSQL with pgvector extension
postgres:
image: pgvector/pgvector:0.7.4-pg16
image: pgvector/pgvector:0.7.4-pg16@sha256:0f7adb53ad971b3fb78e71f2b5daaa88a94c8b0731b114e4673cbf281da0c691
container_name: embapi-postgres
environment:
POSTGRES_USER: ${SERVICE_DBUSER:-postgres}
Expand Down Expand Up @@ -33,14 +33,14 @@ services:
SERVICE_DEBUG: ${SERVICE_DEBUG:-false}
SERVICE_HOST: ${SERVICE_HOST:-0.0.0.0}
SERVICE_PORT: ${SERVICE_PORT:-8880}

# Database configuration
SERVICE_DBHOST: ${SERVICE_DBHOST:-postgres}
SERVICE_DBPORT: ${SERVICE_DBPORT:-5432}
SERVICE_DBUSER: ${SERVICE_DBUSER:-postgres}
SERVICE_DBPASSWORD: ${SERVICE_DBPASSWORD:-postgres}
SERVICE_DBNAME: ${SERVICE_DBNAME:-embapi}

# Security configuration
SERVICE_ADMINKEY: ${SERVICE_ADMINKEY}
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func setupTestDatabase(t *testing.T) *pgxpool.Pool {

// Create PostgreSQL container with pgvector
req := testcontainers.ContainerRequest{
Image: "pgvector/pgvector:0.7.4-pg16",
Image: "pgvector/pgvector:0.7.4-pg16@sha256:0f7adb53ad971b3fb78e71f2b5daaa88a94c8b0731b114e4673cbf281da0c691",
ExposedPorts: []string{"5432/tcp"},
Env: map[string]string{
"POSTGRES_PASSWORD": "password",
Expand Down
Loading