GSoumyajit2005 commited on
Commit
3e2fe96
·
1 Parent(s): e8efc4f

chore: Add docker-compose for local PostgreSQL development

Browse files
Files changed (1) hide show
  1. docker-compose.yml +24 -0
docker-compose.yml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # docker-compose.yml
2
+
3
+ version: "3.8"
4
+
5
+ services:
6
+ postgres:
7
+ image: postgres:15-alpine
8
+ container_name: invoice_db
9
+ environment:
10
+ POSTGRES_USER: ${POSTGRES_USER:-user}
11
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
12
+ POSTGRES_DB: ${POSTGRES_DB:-invoices_db}
13
+ ports:
14
+ - "5432:5432"
15
+ volumes:
16
+ - postgres_data:/var/lib/postgresql/data
17
+ healthcheck:
18
+ test: ["CMD-SHELL", "pg_isready -U user -d invoices_db"]
19
+ interval: 5s
20
+ timeout: 5s
21
+ retries: 5
22
+
23
+ volumes:
24
+ postgres_data: