Skip to content

Commit 553f0a1

Browse files
authored
Merge pull request code100x#371 from rituraj00/main
updated docker-compose.yml file and adding instruction in README
2 parents b28c0fc + b0fad7c commit 553f0a1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
```
1414
3. Run the following command to start the application:
1515
```bash
16+
docker create volume postgres-data # (optional) run this command if you face any mount volume / volume not exist error
1617
docker-compose up
1718
```
1819

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ services:
2727
ports:
2828
- 5432:5432
2929
volumes:
30-
- ./postgres-data:/var/lib/postgresql/data
30+
- postgres-data:/var/lib/postgresql/data
3131
healthcheck:
3232
test: [ 'CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}' ]
3333
interval: 10s
3434
timeout: 5s
3535
retries: 5
36+
37+
volumes:
38+
postgres-data:

0 commit comments

Comments
 (0)