Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/unit-tests-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
}
echo "Pre-pulling Docker images with authenticated session..."
pull postgres:14
pull postgres:17 # for the heterogeneous PG14/17 test fixture gate (heteroPostgresTest)
pull clickhouse/clickhouse-server:26.2.19.43-alpine@sha256:c6ad6a7eb2fb5999df3adfb8b69a0c7222c68fa9b8f6b04a088564ebbc959251
pull redis:7.2
pull testcontainers/ryuk:0.14.0
Expand Down
5 changes: 5 additions & 0 deletions docker/Dockerfile.postgres17
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM postgres:17

RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-17-partman \
&& rm -rf /var/lib/apt/lists/*
31 changes: 31 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name: triggerdotdev-docker
volumes:
database-data:
database-data-alt:
database-runops-data:
database-replica-data:
redis-data:
minio-data:
Expand Down Expand Up @@ -51,6 +52,36 @@ services:
- -c
- max_connections=500

# Opt-in NEW run-ops database, PG17 (the `database` above is PG14) — a separate cluster
# so the run-ops split's distinct-DB sentinel passes. Start with:
# COMPOSE_PROFILES=runops pnpm run docker
database-runops:
container_name: ${CONTAINER_PREFIX:-}database-runops
profiles: ["runops"]
build:
context: .
dockerfile: Dockerfile.postgres17
restart: always
volumes:
- ${DB_RUNOPS_VOLUME:-database-runops-data}:/var/lib/postgresql/data/
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
networks:
- app_network
ports:
- "${POSTGRES_RUNOPS_HOST_PORT:-5434}:5432"
command:
- -c
- listen_addresses=*
- -c
- wal_level=logical
- -c
- shared_preload_libraries=pg_partman_bgw
- -c
- max_connections=500

# Opt-in streaming read replica with configurable apply lag — a dial-a-lag rig for
# testing replica-race behavior (e.g. the realtime read-your-writes gate) locally.
# Start with: COMPOSE_PROFILES=replica pnpm run docker
Expand Down
1 change: 1 addition & 0 deletions internal-packages/run-ops-database/.env
6 changes: 6 additions & 0 deletions internal-packages/run-ops-database/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
generated/run-ops

# Ensure the .env symlink is not removed by accident
!.env
39 changes: 39 additions & 0 deletions internal-packages/run-ops-database/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "@internal/run-ops-database",
"private": true,
"version": "0.0.1",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"@triggerdotdev/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./prisma/schema.prisma": "./prisma/schema.prisma",
"./prisma/*": "./prisma/*",
"./package.json": "./package.json"
},
"dependencies": {
"@prisma/client": "6.14.0",
"prisma": "6.14.0"
},
"devDependencies": {
"rimraf": "6.0.1",
"vitest": "4.1.7"
},
"scripts": {
"clean": "rimraf dist",
"generate": "prisma generate",
"db:migrate:dev:create": "prisma migrate dev --create-only",
"db:migrate:deploy": "prisma migrate deploy",
"db:push": "prisma db push",
"test": "vitest run",
"typecheck": "tsc --noEmit",
"build": "pnpm run clean && tsc --noEmit false --outDir dist --declaration",
"dev": "tsc --noEmit false --outDir dist --declaration --watch",
"db:studio": "prisma studio",
"db:reset": "prisma migrate reset"
}
}
Loading
Loading