How to expose multiple ports in docker-compose.yml for one container? For example, I need to expose port for postgresql container and if 5432 is occupied (by local postgresql) than set it to the next one in range 5432-5442. Is it possible?
I have a web application hosted on a server, it uses virtualEnv to separate dev and prod instances. Both instances share the same postgres database. (all on the same server) I am kind of new to docker and I would like to replace the dev and prod instances with docker containers, and each link to […]
I am trying to monitor psql container through zabbix. My zabbix-server is not allowed to gather data. I am getting different output for zabbix_get and zabbix_agentd command. output of zabbix_agentd is- [root@ip-]# zabbix_agentd -t psql.running[/usr/local/bin,/usr/local/etc] psql.running[/usr/local/bin,/usr/local/etc] [t|1] output from zabbix_get is as- [root@ip]# zabbix_get -s127.0.0.1 -p10050 -k psql.running[/usr/local/bin,/usr/local/etc] psql: could not connect to server: Permission […]
I am not able to connect wild-fly container to PostgreSQL server which is running in different container. But, I am able to connect to database from host machine.
I am trying to build and run two Docker containers hosting PostgreSQL and Citus extension using ansible-container. I am aware that Citus provides containers, but I want to build my own. My container.yaml looks as follows: version: ‘2’ services: database_master: image: hackermd/ubuntu-trusty-python user: postgres expose: – 5043 entrypoint: [‘dumb-init’, ‘–‘] command: [‘/usr/bin/pg_ctlcluster’, ‘9.6’, ‘master’, ‘start’] […]
Yesterday I restarted my docker container for my database. My applications can still connect as normal however: The following line no-longer works docker exec -i -t database_1 bash Instead it gives me this error: unable to find user postgres: no matching entries in passwd file I don’t know why it’s not just giving me bash
I’m cant connect to PostgreSQL with php code. My Postgresql is docker container. I get an IP with: docker inspect toshi_db_1 How I’m trying to connect: $dbconn = pg_connect(“host=172.17.0.2 port=5432 dbname=toshi_development”)or die(“Could not connect”); Error: Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection timed out (0x0000274C/10060) Is the server […]
I can connect to my local Postgres DB in my web app, but NOT if I am running the web app inside of a Docker container. Web app running inside of a Docker container Postgres running in the Host machine I am not sure if it is related to the Postgres connection settings or to […]
I have the following docker-compose file: version: ‘2’ services: node: build: ./node/ ports: – “3000:3000” volumes: – ~/src/api:/code links: – postgres environment: – NODE_ENV=dev – POSTGRES_ADDRESS=postgres postgres: build: ./postgres/ ports: – “8000:5432” environment: – POSTGRES_PASSWORD=pw volumes: – ~/Postgres/data/:/var/lib/postgresql/data But when I access process.env.POSTGRES_ADDRESS in my nodejs, it returns ‘postgres’. This is the way I have […]
I have a Vagrant box in which I have a Docker container that runs PostgreSQL. The container is the official one found here I want to be able to connect to Postgres from the host (i.e outside of Vagrant) using psql but can’t get it to work. (Get a “could not connect”-error). I have added […]