Camo
Camo3mo ago

Connect postgres from docker.

Self hosted - on the same machine that i got windmill, i have another postgres container running. I want to be able to connect to it from my windmill instance. As I understand i have to make a network and combine windmill and postgress in it. Which is the container from windmill that is responsible for connection i just want to add one container to the same network.
1 Reply
Camo
CamoOP3mo ago
sudo docker network create shared-windmill-network

sudo docker network connect shared-windmill-network postgres-db-1

sudo docker network connect shared-windmill-network windmill-lsp-1
sudo docker network connect shared-windmill-network windmill-caddy-1
sudo docker network connect shared-windmill-network windmill-windmill_server-1

sudo docker network connect shared-windmill-network windmill-windmill_worker-1
sudo docker network connect shared-windmill-network windmill-windmill_worker-2
sudo docker network connect shared-windmill-network windmill-windmill_worker-3

sudo docker network connect shared-windmill-network windmill-windmill_worker_native-1
sudo docker network connect shared-windmill-network windmill-windmill_worker_native-2
sudo docker network connect shared-windmill-network windmill-db-1
sudo docker network create shared-windmill-network

sudo docker network connect shared-windmill-network postgres-db-1

sudo docker network connect shared-windmill-network windmill-lsp-1
sudo docker network connect shared-windmill-network windmill-caddy-1
sudo docker network connect shared-windmill-network windmill-windmill_server-1

sudo docker network connect shared-windmill-network windmill-windmill_worker-1
sudo docker network connect shared-windmill-network windmill-windmill_worker-2
sudo docker network connect shared-windmill-network windmill-windmill_worker-3

sudo docker network connect shared-windmill-network windmill-windmill_worker_native-1
sudo docker network connect shared-windmill-network windmill-windmill_worker_native-2
sudo docker network connect shared-windmill-network windmill-db-1
postgres://postgres:PASSWORD@postgres-db-1:5432/test was able to connect now