dockerを使ってlocal環境で開発しており、postgresqlを使っています。local開発環境のdbの値をpostico経由で見たいのですが
could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5433? could not connect to server: Connection refused Is the server running on host "localhost" (fe80::1) and accepting TCP/IP connections on port 5433? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5433?
と出てしまいます。dockerfileなどは下記設定です。railsで開発しています。
version: '3' services: db: image: postgres:9.5.18 volumes: - ./docker/pg:/var/lib/postgresql environment: POSTGRES_PASSWORD: password POSTGRES_USER: localhost POSTGRES_DB: test_db ports: - '5433:5432' web: build: . command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" volumes: - .:/myapp ports: - "3000:3000" depends_on: - db
database.yml
default: &default adapter: postgresql encoding: unicode host: db username: postgres password: password pool: 5 development: <<: *default database: myapp_development test: <<: *default database: myapp_test
posticoの設定は下記
回答3件
あなたの回答
tips
プレビュー