Run PocketBase as a compose stack, tests included, without Testcontainers
This commit is contained in:
1 parent
bbe792192d
commit
b1d1953a62
14 files changed
+393
-217
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# Test overlay: layered on top of compose.yaml + compose.dev.yaml, used only by the
|
||||
# integration tests (PocketBaseFixture). Its single job is to drop the fixed host
|
||||
# port 8090 the dev overlay binds, so the test stack does not fight the running dev
|
||||
# stack over that port. An empty host port ("8090" alone) lets Docker pick a random
|
||||
# free one; the tests read it back with `docker compose port`.
|
||||
#
|
||||
# docker compose -f compose.yaml -f compose.dev.yaml -f compose.test.yaml ...
|
||||
|
||||
services:
|
||||
eb-pocketbase:
|
||||
# Drop the fixed name from the base so compose auto-names the container
|
||||
# (eb-test-stack-eb-pocketbase-1). That keeps the test stack from fighting a
|
||||
# running dev stack -- which keeps the readable fixed names -- over the name
|
||||
# "eb-pocketbase". ("!reset null" clears the inherited scalar value.)
|
||||
container_name: !reset null
|
||||
# !override replaces the whole inherited ports list (a plain list would merge
|
||||
# additively and keep the dev overlay's 8090:8090). "8090" without a host port
|
||||
# lets Docker pick a random free one; the tests read it back with `compose port`.
|
||||
ports: !override
|
||||
- "8090"
|
||||
|
||||
eb-web:
|
||||
container_name: !reset null # see eb-pocketbase above (eb-web is not started in tests)
|
||||
Reference in new issue
Block a user