Answer the question
In order to leave comments, you need to log in
How to connect to a postgres container from another server?
the container with postgres is spinning on the same server with the following compos file:
version: "2"
services:
db:
image: "postgres:11-alpine"
container_name: db
restart: always
ports:
- 127.0.0.1:${POSTGRES_PORT}:5432
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
volumes:
- postgres-volume:/var/lib/postgresql/data
volumes:
postgres-volume:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question