The test step for my project need run the docker-compose to spin some services like postgres, when I run the docker-compose I got this error:
docker-compose up -d
Creating network "animal_default" with the default driver Pulling postgres (postgres:latest)... latest: Pulling from library/postgres Status: Downloaded newer image for postgres:latest Pulling grafana (kamon/grafana_graphite:latest)... latest: Pulling from kamon/grafana_graphite Status: Downloaded newer image for kamon/grafana_graphite:latest
Creating animal_grafana_1 Creating animal_postgres_1
ERROR: for postgres Cannot start service postgres: driver failed programming external connectivity on endpoint animal_postgres_1 (74e6a313523f26cd8ae95d056ee3183dd987696bfd14afbd1b32b758b966a86e): Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use ERROR: Encountered errors while bringing up the project.
Do I need change the port? or how to fix that?
thanks for your help!
this is my docker compose:
version: '2' services: postgres: image: postgres ports: - 5432:5432 environment: POSTGRES_DB: animal_dev POSTGRES_USER: animal POSTGRES_PASSWORD: animal grafana: image: kamon/grafana_graphite logging: options: max-size: "100k" max-file: "20" ports: - 11080:80 - 11081:81 - 18125:18125/udp - 18126:18126