Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#
# You can define multiple database connections below.

# Docker Demo Database
DATABASE_URL=postgresql://postgres:password@localhost:5432/db_handler_demo

# Production Database
DATABASE_URL=postgresql://user:password@localhost:5432/prod_db

Expand Down
27 changes: 24 additions & 3 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,34 @@ services:
image: oven/bun:latest
command: bash
volumes:
- .:${PWD}
working_dir: ${PWD}
- .:/app
- /app/node_modules
working_dir: /app
environment:
- TZ=Europe/Paris
- LOG_LEVEL=trace
env_file:
- .env
tty: true
init: true

depends_on:
postgres:
condition: service_healthy

postgres:
image: postgres:17-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: db_handler_demo
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5

volumes:
pg_data: