File tree Expand file tree Collapse file tree
examples/v3_reference_seller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ cd examples/v3_reference_seller
2626docker 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
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change 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
1010After seeding, hit:
2929async 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 :
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments