From 1c95c2251d5d3f53ef6ac51256a5d4f56b045ccd Mon Sep 17 00:00:00 2001 From: counterweight Date: Fri, 14 Feb 2025 23:37:32 +0100 Subject: [PATCH] postgres reachable from outside container --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0e71e00..f8291d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ RUN apt-get update && apt-get install -y \ postgresql caddy nodejs npm && \ rm -rf /var/lib/apt/lists/* +RUN echo "listen_addresses='*'" >> /etc/postgresql/15/main/postgresql.conf && \ + echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/15/main/pg_hba.conf && \ + echo "host all all ::/0 md5" >> /etc/postgresql/15/main/pg_hba.conf + # Set up working directory for Express app WORKDIR /app COPY package*.json ./