File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#
1717# You can define multiple database connections below.
1818
19+ # Docker Demo Database
20+ DATABASE_URL = postgresql://postgres:password@localhost:5432/db_handler_demo
21+
1922# Production Database
2023DATABASE_URL = postgresql://user:password@localhost:5432/prod_db
2124
Original file line number Diff line number Diff line change @@ -3,13 +3,34 @@ services:
33 image : oven/bun:latest
44 command : bash
55 volumes :
6- - .:${PWD}
7- working_dir : ${PWD}
6+ - .:/app
7+ - /app/node_modules
8+ working_dir : /app
89 environment :
910 - TZ=Europe/Paris
1011 - LOG_LEVEL=trace
1112 env_file :
1213 - .env
1314 tty : true
1415 init : true
15-
16+ depends_on :
17+ postgres :
18+ condition : service_healthy
19+
20+ postgres :
21+ image : postgres:17-alpine
22+ restart : always
23+ environment :
24+ POSTGRES_USER : postgres
25+ POSTGRES_PASSWORD : password
26+ POSTGRES_DB : db_handler_demo
27+ volumes :
28+ - pg_data:/var/lib/postgresql/data
29+ healthcheck :
30+ test : ["CMD-SHELL", "pg_isready -U postgres"]
31+ interval : 5s
32+ timeout : 5s
33+ retries : 5
34+
35+ volumes :
36+ pg_data :
You can’t perform that action at this time.
0 commit comments