Initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Local development: Postgres + the app. Mirrors what Miabi wires up for you
|
||||
# (a managed Postgres attached to the app via DATABASE_URL).
|
||||
services:
|
||||
db:
|
||||
image: postgres:17-alpine
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: guestbook
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
|
||||
app:
|
||||
build: .
|
||||
environment:
|
||||
PORT: 8080
|
||||
DATABASE_URL: postgres://postgres:postgres@db:5432/guestbook?sslmode=disable
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
Reference in New Issue
Block a user