0

I'm setting up db. But I have problems with some code. How path should looks like?

Here is my docker-compose.yml

version: '3.6'

services:
  postgresql:
    image: postgres:12-alpine
    restart: unless-stopped
    ports:
      - 5432:5432
    environment:
      POSTGRES_DB: test
      POSTGRES_USER: user1
      POSTGRES_PASSWORD: user123
    volumes:
      - postgres-data:/var/lib/postgresql/data

volumes:
  postgres-data:
    driver: local

after running command docker-compose up -d, I would like to create db from "Data source", but I'm getting error. Image: https://i.sstatic.net/5uIKP.jpg

Also here is output of docker container ps -a https://i.sstatic.net/c446H.jpg

4
  • 1
    what is db source? It looks like you have problems with connection but setup seems correct - have you provided right password for your user? Commented Oct 22, 2019 at 19:56
  • Sorry I did mistake, I meant "Data source" not "db source" Here's image: Image Commented Oct 22, 2019 at 20:08
  • 1
    type docker container ps -a and edit your question with the output. Also try not to use -d option as it will detach from the output. Check logs after launching without -d option and post them here. Commented Oct 22, 2019 at 20:11
  • So I try without <code>d</code>, but terminal stop at: i.imgur.com/RLhdAPK.jpg And kitematiclog: i.imgur.com/V2pNwat.jpg Commented Oct 22, 2019 at 20:28

1 Answer 1

0

Problem was in Docker version, I was using 18.03. On 19.03 works fine!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.