-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathdocker-compose.phar.yml
More file actions
44 lines (43 loc) · 2.01 KB
/
docker-compose.phar.yml
File metadata and controls
44 lines (43 loc) · 2.01 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
42
43
44
# docker-compose.phar.yml — run the DBDiff PHAR against any remote database
#
# ── Podman (recommended — no daemon required) ────────────────────────────────
#
# # Build once (~30 sec to compile PHP extensions):
# podman build -f docker/Dockerfile.phar -t dbdiff-phar .
#
# # Schema diff between two Supabase projects:
# podman run --rm --network=host \
# -v "$(pwd):/app:ro" dbdiff-phar diff \
# --server1-url="postgresql://postgres:<pass>@db.<ref1>.supabase.co:5432/postgres" \
# --server2-url="postgresql://postgres:<pass>@db.<ref2>.supabase.co:5432/postgres"
#
# # MySQL diff:
# podman run --rm --network=host \
# -v "$(pwd):/app:ro" dbdiff-phar diff \
# --server1-url="mysql://user:pass@host:3306/db1" \
# --server2-url="mysql://user:pass@host:3306/db2"
#
# ── Docker / docker compose ───────────────────────────────────────────────────
#
# docker compose -f docker-compose.phar.yml build
# docker compose -f docker-compose.phar.yml run --rm dbdiff diff \
# --server1-url="postgresql://..." --server2-url="postgresql://..."
#
# ── Notes ─────────────────────────────────────────────────────────────────────
#
# Passwords with special characters: percent-encode @ → %40, # → %23
#
# Rebuild the PHAR first if you've changed source files:
# scripts/build-local.sh
services:
dbdiff:
build:
context: .
dockerfile: docker/Dockerfile.phar
# Mount the project root so /app/dist/dbdiff.phar is available.
# The entrypoint is: php /app/dist/dbdiff.phar
volumes:
- .:/app:ro
# Use host networking so the container can reach remote databases
# (Supabase, local MySQL/Postgres on the host, etc.) without extra config.
network_mode: host