Skip to content

Instantly share code, notes, and snippets.

View januszm's full-sized avatar

Janusz Mordarski januszm

View GitHub Profile
@MauricioMoraes
MauricioMoraes / access_postgresql_with_docker.md
Last active November 2, 2023 23:34
Allow Docker Container Access to Host's Postgres Database on linux (ubuntu)

You have to do 2 things in order to allow your container to access your host's postgresql database

  1. Make your postgresql listen to an external ip address
  2. Let this client ip (your docker container) access your postgresql database with a given user

Obs: By "Host" here I mean "the server where docker is running on".

Make your postgresql listen to an external ip address

Find your postgresql.conf (in case you don't know where it is)

$ sudo find / -type f -name postgresql.conf

@mmb
mmb / graphite_grafana.sh
Last active August 4, 2017 20:06
graphite/statsd/grafana setup on new Amazon Linux instance
# graphite/statsd/grafana setup on new Amazon Linux instance
# add http://graphite/ to grafana as a data source
sudo su
yum update --assumeyes
yum install --assumeyes docker
service docker start
docker \
run \