forked from thewheat/brunei_bus_routes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
30 lines (28 loc) · 1.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
30 lines (28 loc) · 1.08 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
# Local Postgres that mirrors the managed database the app uses on Replit, so
# the Postgres backend in db.py can be exercised without deploying. Start it with
# docker compose up -d
# then point the app at it:
# DATABASE_URL=postgresql://brunei:5ef5698f3195f7effabb1dbeb822b568@localhost:5432/brunei_bus python app.py
# Data persists in the named volume across restarts; `docker compose down -v`
# wipes it. This file is for local dev/testing only — Replit provisions its own
# Postgres and injects DATABASE_URL. The password below is a throwaway dev
# credential; rotate it freely (recreate the container with `down -v` after).
services:
postgres:
image: postgres:16
container_name: brunei_bus_pg
environment:
POSTGRES_USER: brunei
POSTGRES_PASSWORD: 5ef5698f3195f7effabb1dbeb822b568
POSTGRES_DB: brunei_bus
ports:
- "5432:5432"
volumes:
- brunei_bus_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U brunei -d brunei_bus"]
interval: 5s
timeout: 5s
retries: 10
volumes:
brunei_bus_pgdata: