Tag: postgresql

Why am I getting docker@postgres ERROR: relation “accounts_myprofile” does not exist?

So I am working on a project Django/Postgres project. When I run docker-compose up, the project launches with Django in one container and Postgres in the other. I am able to view certain URL’s of my project, however the ones that query MyProfile model, all result in the following error: docker@postgres ERROR: relation “accounts_myprofile” does […]

Unable to connect to dockerized postgres on localhost, but remote connection is working

I created docker postgres instance with docker run -d \ –name test_db \ -v data:/var/lib/postgresql/data \ -e “POSTGRES_PASSWORD=abcdefghij” \ -e “POSTGRES_USER=testuser” \ -p 5432:5432 \ postgres I can properly connect to this database from other hosts using public server ip, eg. psql -U testuser -h -d testuser // in reality I use proper IP […]

How can I fix binary file corrupted by pseudo-terminal option during ssh transfer?

I had create the dump of database which located inside docker container using this command: docker exec -it container_id pg_dump -U postgres -Fc -d database_name > local_file.dump -t flag enable pseudo-terminal mode. As a result local_file.dump is corrupted. Can I fix this binary file?

Copy Postgres database structures but not data

We are creating a Dockerfile that can spin up a Postgres database container, using this image as a basis https://hub.docker.com/_/postgres/ Every time we test we want to create a fresh database with the production database as a template – we want to copy the database structures without copying the data in tables etc. Can someone […]

apache-php doesn't start with docker-compose

I have this container which seems to not work, and I’m unable to figure why, it left no logs FROM debian:latest RUN apt-get update && apt-get -y install apache2 libapache2-mod-php5 RUN apt-get -y install postgresql php5-pgsql RUN apt-get update && apt-get -y install php5-common php5-cli php5-fpm php5-mcrypt php5-pgsql php5-apcu php5-gd php5-imagick php5-curl php5-intl RUN a2enmod […]

Can't start docker with postgres

Can’t start docker with postgres, could not access private key file “/etc/ssl/private/ssl-cert-snakeoil.key The command I ran: sudo docker exec tryton-server /etc/init.d/postgresql start Error: tryton-server Starting PostgreSQL 9.4 database server: mainThe PostgreSQL server failed to start. Please check the log output: 2016-11-11 03:42:24 UTC [27-1] FATAL: could not access private key file “/etc/ssl/private/ssl-cert-snakeoil.key”: Permission denied … […]

How to allow my host IP address in the PostgreSQL pg_hba.conf file

I’m having a PostgreSQL instance running on my local machine, listening on all the interfaces (listen_addresses = ‘*’), and Docker running a Rails application which needs to connect to this database. Updating manually the pg_hba.conf file by adding a line allowing my IP address makes the application working. Now, given my computer has the IP […]

Connecting to Host Postgresql From inside a Container

I have a python application running inside a container. The application needs to connect to PostgreSQL that is running in host (not in any other container ). I tried various approaches spread around the internet still no luck since a day. Possible reason for failure may be lack of correct implementation or Knowledge base. Any […]

Docker build php+nginx+pgsql in separated containers

I’m trying to make a php7+nginx+pgsql development environment in separated containers by docker-compose. Here’s my docker-compose.yml: webserver: build: ./nginx ports: – “8888:80” volumes: – ./site.conf:/etc/nginx/conf.d/default.conf links: – php-fpm php-fpm: build: ./php-fpm volumes: – /path/to/codes/:/var/www/ Now I’m just missing the pgsql. How to add pgsql to the docker-compose.yml?

docker – can't connect to external postgres db

We’re running a docker container that connects to a postgres database on the same server but not within a container. I can connect via psql or pgadmin fine but within the docklet we are seeing the following errors messages coming from Catalina. Apologies on the unformatted mess but the crux is that the following error […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.