-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yaml
More file actions
41 lines (40 loc) · 1.85 KB
/
Copy pathdocker-compose.test.yaml
File metadata and controls
41 lines (40 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# ─────────────────────────────────────────────────────────────────────────────
# OpenBlog — test database (used by `pnpm run test:*`)
# ─────────────────────────────────────────────────────────────────────────────
# Brings up a throwaway Postgres instance for the test suite.
#
# ⚠️ EXCEPTION TO THE `openblog` LOCKDOWN: this compose uses
# `openblog_test` for the database name. This is INTENDED — the
# vitest integration tests, playwright e2e tests, and `scripts/test-*`
# shells all hard-code `openblog_test` so a developer can run them
# in parallel with a running dev database on `openblog` without
# colliding. Do not "normalize" this file's name to `openblog`.
# ─────────────────────────────────────────────────────────────────────────────
services:
postgres-test:
build:
context: .
dockerfile: Dockerfile.postgres
image: openblog-postgres:test
container_name: openblog-db-test
restart: "no"
init: true
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: openblog_test
command:
- postgres
- -c
- shared_preload_libraries=pg_cron
- -c
- cron.database_name=openblog_test
- -c
- cron.use_background_workers=on
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 3s
retries: 10