Tag: postgresql

initdb: could not change permissions of directory on Postgresql container

I am new to the docker ecosystem and I am trying to spin up a simple postgres container along with a volume so it persists its data, by using a yaml composer file. The file is as follows: # Use postgres/example user/password credentials version: ‘3.3’ services: db: image: postgres environment: POSTGRES_DB: recrow POSTGRES_USER: recrow POSTGRES_PASSWORD: […]

dockerize a Rails app, error Postgres

I’m trying to dockerize a Rails app. The problem I get is that I get this error: PG::ConnectionBad: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”? The docker container that holds the Postgres(running btw): 3e11664277b3 postgres:9.6.1 “/docker-entrypoint.s” 2 days ago […]

Docker need to access hosts's Postgres database

I have a Flask app that’s running inside a Docker container, and I can run it using the following command. docker run -e DB_HOST=<…> -e DB_PORT=<…> -e DB_NAME=<…> -e DB_USER=<…> -e DB_PASSWORD=<…> -p 8080:8080 <tag name> Before the database was on AWS, now the database is running on a MAC laptop. So how can the […]

Rails 5 apps connected to Docker + Puma (Nginx) + PostgreSQL

I’ve seen a few tutorials but cannot manage to set it up just as I’d like. I have a number of Rails apps which I do not want to place inside a Docker container as it makes things such as running tasks or migrations a bit annoying. However, I’d like to connect these apps to […]

Edit configuration file for running Docker instance of Kong

I am currently testing out Kong API Gateway and have it running with PostgreSQL, both in separate Docker containers on the same machine. So far, I have been able to successfully link to my API and add a plugin, but now I want to try changing some of the configuration variables and am running into […]

Restoring a local pg_dumpall in a docker container

I have scoured the web, and cant find a solution that fits my needs. I have been following this tutorial loosely with Flask instead of Django. I’ve got the docker-compose build command working without error, and then the docker-compose up command working as well. With the latter I get name_of_container_data_1 exited with code 0 and […]

Multi PostgreSQL DB in data only container

Im trying to hook up and contain my application in docker containers. One problem I have been having is configuring the DB for the application. I have been reading with conflicting results that the data-only-containers (DOC) should be used. And in other places they shouldn’t be used. So when should they be used? I also […]

Docker compose ruby + postgres – cannot connect to postgres

I created Dockerfile to ruby from official docker compose website. I used docker compose to integrate this with postgres. When docker-compose up, then postgresql start but I cannot connect to this. The main problem is in ruby database config because I can’t change to listen to another host and set default user. I don’t know […]

Import a heroku postgres database dump into a docker database container with boot2docker

I’m running boot2docker on OSX 10.10. I have a database container set up so my databases don’t get reset every time I start/stop a container. I would like to import a dump of a postgres database from heroku into my docker database. Is this possible to do?

Running PostgreSql inside Docker

I have the following config lines: RUN sudo apt-get -y install postgresql USER postgres RUN /etc/init.d/postgresql start &&\ psql –command “CREATE USER test WITH SUPERUSER PASSWORD ‘test’;” &&\ createdb -O test test EXPOSE 5432 CMD [“mono”, “src/Rest.Api/bin/Debug/Rest.Api.exe”] However, running the final command to spin up my API yields this: setting listen on Failed to establish […]

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