Skip to content

Commit 44a66eb

Browse files
committed
fix(examples/v3-reference-seller): drop literal POSTGRES_PASSWORD from compose (GitGuardian flag)
1 parent bfa7eb5 commit 44a66eb

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

examples/v3_reference_seller/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ cd examples/v3_reference_seller
2626
docker compose up -d postgres
2727

2828
# 2. Seed dev fixtures
29-
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost/adcp \
29+
DATABASE_URL=postgresql+asyncpg://postgres@localhost/adcp \
3030
python -m seed
3131

3232
# 3. Boot the seller
33-
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost/adcp \
33+
DATABASE_URL=postgresql+asyncpg://postgres@localhost/adcp \
3434
python -m src.app
3535
```
3636

examples/v3_reference_seller/docker-compose.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ services:
66
postgres:
77
image: postgres:16
88
environment:
9-
POSTGRES_PASSWORD: postgres
109
POSTGRES_DB: adcp
1110
# ``trust`` is fine for the loopback dev compose; production
12-
# deployments use scram-sha-256 + a real password.
11+
# deployments use scram-sha-256 + a real password sourced from
12+
# a secrets backend (Vault, AWS Secrets Manager, sealed-secrets).
13+
# No POSTGRES_PASSWORD here on purpose — the ``trust`` auth
14+
# method makes it unused, and shipping a literal in version
15+
# control flags secret-scanners.
1316
POSTGRES_HOST_AUTH_METHOD: trust
1417
ports:
1518
- "5432:5432"

examples/v3_reference_seller/seed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
::
55
66
docker compose up -d postgres
7-
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost/adcp \\
7+
DATABASE_URL=postgresql+asyncpg://postgres@localhost/adcp \\
88
python -m examples.v3_reference_seller.seed
99
1010
After seeding, hit:
@@ -29,7 +29,7 @@
2929
async def main() -> None:
3030
db_url = os.environ.get(
3131
"DATABASE_URL",
32-
"postgresql+asyncpg://postgres:postgres@localhost/adcp",
32+
"postgresql+asyncpg://postgres@localhost/adcp",
3333
)
3434
engine = create_async_engine(db_url)
3535
async with engine.begin() as conn:

examples/v3_reference_seller/src/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
cd examples/v3_reference_seller
2525
docker compose up -d postgres
26-
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost/adcp \\
26+
DATABASE_URL=postgresql+asyncpg://postgres@localhost/adcp \\
2727
python -m src.app
2828
"""
2929

@@ -94,7 +94,7 @@ def main() -> None:
9494

9595
db_url = os.environ.get(
9696
"DATABASE_URL",
97-
"postgresql+asyncpg://postgres:postgres@localhost/adcp",
97+
"postgresql+asyncpg://postgres@localhost/adcp",
9898
)
9999
port = int(os.environ.get("PORT", "3001"))
100100

0 commit comments

Comments
 (0)