Tag: postgresql

change db:5432 to in docker-compose file

In my docker-compose.yml file i have two images. I am linking db to my myapp container with node.js application and everything works as long as my sequelize database host is db. var sequelize = new Sequelize(DATABASE, USERNAME, PASSWORD, { “host”: “db”, “port”: 5432, “dialect”: “postgres” }); Is it possible to configure docker-compose.yml so I can […]

Docker Container Networking one container on one network

I’m using Docker for Windows RC4. I’m trying to link 2 containers i.e. A container of ASPNET Core 1.0 and another one is of PostgreSQL using Container Networking. In my ASPNET Core app (Whose container I’m using) the connection string points to the Docker official PostgreSQL container as: User ID=postgres;Password=5432;Host=localhost;Server=localhost;Port=5432;Database=ApplicationDbContext;Pooling=true; Now when I use legacy […]

How to store data in external drive with Docker Postgres:9.3 image?

I want to setup my database inside a container using the Postgres:9.3 docker image, however I want to store my data in external drive. I attempted it using the command `docker run -dit -p 5432:5432 -v /mnt/external/docker_volume:/var/lib/postgresql/data –name mydatabase postgres:9.3` Container got created as it echoes the container id, but it is not shown as […]

Extending CentOS7 Postgresql 9.4 Docker image

I’m trying to extend centos/postgresql-94-centos7 Docker image (https://hub.docker.com/r/centos/postgresql-94-centos7/) for purpose of using it in combination with Bitbucket’s Pipelines. Bitbucket Pipelines is new beta continuous delivery system which uses Docker images to run your app’s tests. I want to have pip, Pillow dependencies and tox installed when container is run and because of Pipelines, I want […]

Persistent Data when Scaling Postgres with Citus and Docker Compose

I am trying to run a scalable PostgreSQL database cluster using Citus and Docker. I am following the instructions from the readme in the Citusdata Docker repository. With that, I can successfully start the citus cluster as described in the document. However, in my understanding of docker-compose, scaling a service with the scale command docker-compose […]

How to correctly specify named volumes when trying to backup files in docker

I have the below docker-compose file version: ‘2’ services: postgres: container_name: postgres image: postgres:${POSTGRES_VERSION} volumes: – postgresdata:/var/lib/postgresql/data ports: – “5432:5432” environment: – POSTGRES_DB=42EXP node: container_name: node build: . links: – postgres:postgres ports: – “8000:8000” depends_on: – postgres command: npm start volumes: postgresdata: on running docker volume ls i have local 42exp_postgresdata When trying to perform […]

docker alpine postgres in compose not executing docker-entrypoint-initdb.d scripts

When using the https://github.com/kiasaki/docker–alpine-postgres image in docker compose, the scripts inside /docker-entrypoint.initdb.d are not being executed as I view from the logs: db_1 | LOG: database system was shut down at 2016-09-05 18:16:02 UTC db_1 | LOG: MultiXact member wraparound protections are now enabled db_1 | LOG: database system is ready to accept connections db_1 […]

How to make persistent storage with docker-compose up-down-up?

I have a multiple container application, that is using the postgres image in docker-compose.yml file. Postgres container has volume on host machine for persistent storage. When I run docker-compose up at first time all is fine, postgres creates db files in my host folder. After it I need to shut down application temporarily with docker-compose […]

Rails and postgres application to Docker compose v2, data strategy

I just started learning Docker and am now trying to build my Rails application that uses postgres in a docker setup. Currently my docker file looks as follows: FROM ruby:2.2.5 RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs # Set an environment variable to store where the app is installed to inside […]

Dockerize stack: MapServer – AngularJs web app – Lumen API – PostgreSQL

I’m trying to solve some of my question regarding the architecture of a system consisting of the following: AngularJS web application frontend MapServer generating & serving map images through WMS Lumen REST API backend containing all the business logic PostgreSQL database with PostGIS to store spatial data Which is the proper way to dockerize that […]

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