Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yeahbutstill committed Jun 1, 2024
1 parent 8bb9910 commit 7dc50e0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Contact Management

## Run Container PostgreSQL
Kalau terkena Connection refused saat menjalankan Apps Spring boot, ini karena si Docker itu seolah-olah jalan di computer lain atau Virtual Machine jadi portnya itu tidak kelihatan dari si laptop.
Maka dari itu kita harus mengluarkan port tersebut atau mengexposenya.
https://software.endy.muhardin.com/linux/intro-docker


jalan kan compose.yaml
![img.png](img.png)
Expand Down
17 changes: 13 additions & 4 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
services:
postgres:
image: 'postgres:15-alpine'
postgresdb:
image: 'postgres:16.3-alpine3.20'
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
# or set shared memory limit when deploy via swarm stack
#volumes:
# - type: tmpfs
# target: /dev/shm
# tmpfs:
# size: 134217728 # 128*2^20 bytes = 128Mb
environment:
- 'POSTGRES_DB=contact_management_db'
- 'POSTGRES_PASSWORD=dani'
- 'POSTGRES_USER=dani'
- 'POSTGRES_USER=zvZnK2CJAo0Xw'
- 'POSTGRES_PASSWORD=nljMTxE2XU1Zp'
- 'PGDATA=/var/lib/postgresql/data/pgdata'
volumes:
- '$PWD/restful-api-contact-management-data:/var/lib/postgresql/data'
Expand Down

0 comments on commit 7dc50e0

Please sign in to comment.