0
votes

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.imgur.com/6fvVGg4.jpg

Also here is output of docker container ps -a https://i.imgur.com/2l0JxtC.jpg

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? - Michał Krzywański
Sorry I did mistake, I meant "Data source" not "db source" Here's image: Image - Kepes
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. - Michał Krzywański
So I try without <code>d</code>, but terminal stop at: i.imgur.com/RLhdAPK.jpg And kitematiclog: i.imgur.com/V2pNwat.jpg - Kepes

1 Answers

0
votes

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