Trying to connect to the docker postgres db ```❯ ...
# docker
a
Trying to connect to the docker postgres db
Copy code
❯ docker/sdk console --version
-->  DEVELOPMENT MODE
Store: DE | Environment: docker.dev
Spryker 1
[1612223285034] INFO (ls): Connection instance created for spryker-db. ns: "conn-manager" [1612223285063] ERROR (ls): Connecting error: {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}},"name":"error"} ns: "conn-manager" [1612223285064] ERROR (ext): ERROR: Error opening connection role "spryker" does not exist, {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}}} ns: "error-handler" [1612223286760] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer"
Copy code
zed and yves are working, but I'd like to connect to the database so i can verify writing a record.

using a postgres client
with these creds

```Host: localhost
Port: 5432
Database: eu-docker
User: spryker
Password: secret
a
Please check if you can connect from the cli using psql:
psql -U spryker -d eu-docker -h localhost
.
a
Copy code
❯ docker/sdk cli psql -U spryker -d eu-docker -h localhost
-->  DEVELOPMENT MODE
psql: error: could not connect to server: 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 5432?
could not connect to server: Address not available
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
with docker/sdk ^ using psql locally ->
Copy code
❯ psql -U spryker -d eu-docker -h localhost
psql: error: FATAL:  role "spryker" does not exist
a
Copy code
version: "0.1"

namespace: spryker_b2c_dev
tag: 'dev'

environment: docker.dev
image:
    tag: spryker/php:7.3-alpine3.12
    php:
        enabled-extensions:
            - blackfire
composer:
    mode: ''
    autoload: ''
assets:
    mode: development

regions:
    EU:
        services:
            database:
                database: eu-docker
                username: spryker <<<<< 
                password: secret

        stores:
            DE:
                services:
                    broker:
                        namespace: de-docker
                    key_value_store:
                        namespace: 1
                    search:
                        namespace: de_search
            AT:
                services:
                    broker:
                        namespace: at-docker
                    key_value_store:
                        namespace: 2
                    search:
                        namespace: at_search
    US:
        services:
            database:
                database: us-docker
                username: spryker
                password: secret
        stores:
            US:
                services:
                    broker:
                        namespace: us-docker
                    key_value_store:
                        namespace: 3
                    search:
                        namespace: us_search
groups:
    EU:
        region: EU
        applications:
            yves_eu:
                application: yves
                endpoints:
                    yves.de.spryker.local:
                        store: DE
                        services:
                            session:
                                namespace: 1
                    yves.at.spryker.local:
                        store: AT
                        services:
                            session:
                                namespace: 2
            glue_eu:
                application: glue
                endpoints:
                    glue.de.spryker.local:
                        store: DE
                    glue.at.spryker.local:
                        store: AT
            zed_eu:
                application: zed
                endpoints:
                    zed.de.spryker.local:
                        store: DE
                        services:
                            session:
                                namespace: 3
                    zed.at.spryker.local:
                        store: AT
                        services:
                            session:
                                namespace: 4
    US:
        region: US
        applications:
            yves_us:
                application: yves
                endpoints:
                    yves.us.spryker.local:
                        store: US
                        services:
                            session:
                                namespace: 5
            glue_us:
                application: glue
                endpoints:
                    glue.us.spryker.local:
                        store: US
            zed_us:
                application: zed
                endpoints:
                    zed.us.spryker.local:
                        store: US
                        services:
                            session:
                                namespace: 6
services:
    database:
        engine: postgres
        root:
            username: "root"
            password: "secret"
        endpoints:
            localhost:5432:
                protocol: tcp
    broker:
        engine: rabbitmq
        api:
            username: "spryker"
            password: "secret"
        endpoints:
            queue.spryker.local:
            localhost:5672:
                protocol: tcp
    session:
        engine: redis
    key_value_store:
        engine: redis
        endpoints:
            localhost:16379:
                protocol: tcp
    search:
        engine: elastic
        version: 6.8
        endpoints:
            localhost:9200:
                protocol: tcp
    scheduler:
        engine: jenkins
        endpoints:
            scheduler.spryker.local:
    mail_catcher:
        engine: mailhog
        endpoints:
            mail.spryker.local:
    swagger:
        engine: swagger-ui
        endpoints:
            swagger.spryker.local:
    redis-gui:
        engine: redis-commander
        endpoints:
            redis-commander.spryker.local:
    dashboard:
        engine: dashboard
        endpoints:
            spryker.local:

docker:

    ssl:
        enabled: false
        redirect: true

    testing:
        store: DE

    debug:
        enabled: true
        xdebug:
            enabled: true

    mount:
        native:
            platforms:
                - linux

        docker-sync:
            platforms:
                - macos
                - windows
ah but maybe the namespace is wrong?
nope looks the same
a
And the application works correctly? First
docker/sdk up
went completely without any problems?
a
ye
docker/sdk up -x
end of ^
a
Let me check if I can connect to DB using debug mode.
👍 1
Without any problems even in debug mode.
So sorry, I have no idea how is it possible. ¯\_(ツ)_/¯
a
okee dokee 🤣
a
I would recommend to run
docker/sdk reset
and it will re-create volumes and others... with new import, with new install etc.
a
Copy code
2648  rm -rf b2c-demo-shop
 2649  mkdir spryker-b2c && cd spryker-b2c
 2650  ls
 2651  git clone <https://github.com/spryker-shop/b2c-demo-shop.git> ./
 2652  git clone git@github.com:spryker/docker-sdk.git docker\n
 2653  ls
 2654  docker/sdk boot deploy.dev.yml
 2655  docker/sdk up
 2656  psql -U spryker -d eu-docker -h localhost
   > psql: error: FATAL:  role "spryker" does not exist
 2657  docker/sdk reset
 2658  psql -U spryker -d eu-docker -h localhost
   > psql: error: FATAL:  role "spryker" does not exist
gonna try switching to mutagen
a
What you've done doesn't recreate volumes, etc. If you are deleting the code, please prune everything.
docker system prune -a && docker system prune --volumes
.
a
a
It should have been created during install process.
a
Copy code
2670  docker system prune -a && docker system prune --volumes
 2671  docker/sdk boot deploy.dev.yml
 2672  docker/sdk up
 2674  psql -U spryker -d eu-docker -h localhost
   > psql: error: FATAL:  role "spryker" does not exist
Should I open an issue here? And is creating a user locally a possible workaround for now?
a
There is no issue in spryker, it's something wrong for you locally. Maybe @high-pencil-62400 will help tomorrow.
h
@astonishing-lamp-41374 try to connect inside
docker/sdk cli
docker/sdk cli psql -U spryker -d eu-docker -h database
And what about root user? Does it work?
a
Copy code
❯  docker/sdk cli psql -U spryker -d eu-docker -h database
-->  DEVELOPMENT MODE
Password for user spryker:
psql (12.5, server 9.6.20)
Type "help" for help.

eu-docker=>
a
Does it mean there is another postgres running locally?
🤔 1
a
Copy code
❯ brew services
Name       Status  User   Plist
emacs      stopped
mysql      started edward /Users/edward/Library/LaunchAgents/homebrew.mxcl.mysql.plist
php        stopped
postgresql started edward /Users/edward/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
unbound    stopped
😄 1
Copy code
❯ which psql
/usr/local/bin/psql
do I need to stop the brew service?
a
Yes, I would say.
a
Dope 🙏 thanks y'all
Copy code
❯ brew services stop postgresql
Stopping `postgresql`... (might take a while)
==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
❯ psql -U spryker -d eu-docker -h localhost
Password for user spryker:
psql (13.1, server 9.6.20)
Type "help" for help.

eu-docker=>
✅ 1
a
Coolio.
🙌 1