Tag: postgresql

Can not connect to postgresql which is inside of a docker container

I’m writing a go app which is dockerized in 2 containers: db and app. while starting containers ‘docker-compose up’ I see the message: dial tcp: lookup dbpgsql on no such host DB_ENV_DB=cldb DB_ENV_USER=cldb DB_ENV_PASS=cldb DB_PORT_5432_TCP_ADDR=dbpgsql DB_PORT_5432_TCP_PORT=5432 here is my docker-compose.yml version: ‘2’ services: server: hostname: app image: golang:1.7.3-alpine build: ./server/ privileged: true container_name: server […]

Jackrabbit with PostgreSQL backend leaves repository in inconsistent state

I run Jackrabbit standalone (v2.12.2) with repository.xml configured to use PostgreSQL (9.5) as data backend. This process runs inside Docker container. Configuration (repository.xml) is attached below. Jackrabbit starts only ONCE. I do the following steps: start Jackrabbit (it initializes Jackrabbit’s repository and database) stop Jackrabbit start Jackrabbit again All subsequent starts fail with the following […]

Proper way to use Dropwizard dbi onDemand

According to the Dropwizard documebtation, DBI dao instances created with DBI.onDemand can open & close connections as needed. I have observed a situation where if you’re running Dropwizard inside a Docker & let it idle for a day or so, my daos are not able to reconnect to the rdbms. What I’m doing is getting […]

pg_dump error while running rake db:migrate

I have postgres container and a ruby container. When running docker-compose run web rake db:migrate I got an error like this rake aborted! failed to execute: pg_dump -s -x -O -f /usr/src/app/db/structure.sql –schema=public –schema=partitioning docker_rails_dev Please check the output above for any errors and make sure that `pg_dump` is installed in your PATH and has […]

Docker Rails App and postgres

I’m trying to “Dockerizing” my RoR app with PostgreSQL, I have a DockerFile and docker-compose file, but when I run this command “docker-compose run webapi” I have this output => Booting WEBrick => Rails 4.2.4 application starting in production on => Run `rails server -h` for more startup options => Ctrl-C to shutdown server […]

Docker SonarQube Qalityprofile

I have configured sonarqube:latest in Docker with Postgres DB. it is up and running. I am able to login. But, I am not able to see any default qualify profiles & languages.. if I tried to restore existing profile. it is not uploading. How to configure Java, JS default profiles in Sonarqube. Docker-Compose sonar: image: […]

Error building docker image while trying to import sql dump to postgres container

I’m making a Dockerfile for an application that connects to a postgres container inside the same docker network. To populate the database, inside the Dockerfile I first install the postgres client and all the dependencies and then try to execute the sql dump like this: RUN apt-get install python python-dev libpq-dev postgresql-client RUN psql -h […]

Docker containers exiting without identifiable cause (Django web application)

I’ve taken over the maintenance of a live web project that utilizes docker containers. Immediately, I’ve noticed that the web app goes down after a couple of hours, and docker ps -a shows me: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9b02f1352f15 nginx:latest “nginx -g ‘daemon off” 9 weeks ago Exited (1) 14 hours […]

can't authenticate user in postgres docker container

containerizing a django app built with the pydanny cookiecutter for deployment to an EC2 instance. the docker_compose.yml is pretty straigtforward: version: ‘2’ volumes: postgres_data: {} postgres_backup: {} services: postgres: build: ./compose/postgres volumes: – postgres_data:/var/lib/postgresql/data – postgres_backup:/backups env_file: .env …. nothing exotic in the dockefile; just pointers to backup and restore scripts and commands to make […]

Postresql query issue when running inside alpine linux container

I’m running postgresql 9.4 on docker, and using postgres-9.4-alpine image from dockerhub library.(https://hub.docker.com/_/postgres/) The Issue When I run select * from tbl where type = ‘directory’ I get no results. It is working when running on the same data with a postgresql-9.4 container from the dockerhub library. the data is being insert to table tbl […]

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