From 7dc50e0d3253e11dd7542d2ec05c8cecb8361068 Mon Sep 17 00:00:00 2001 From: dnl Date: Sat, 1 Jun 2024 14:55:45 +0700 Subject: [PATCH] update --- README.md | 4 ++++ compose.yaml | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 10f59de..89d12a8 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/compose.yaml b/compose.yaml index d948c1c..6abf16f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -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'