Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: site:install with postgres socket #6215

Open
tomdavidson opened this issue Jan 22, 2025 · 0 comments
Open

docs: site:install with postgres socket #6215

tomdavidson opened this issue Jan 22, 2025 · 0 comments

Comments

@tomdavidson
Copy link

tomdavidson commented Jan 22, 2025

Existing document
https://www.drush.org/13.x/commands/site_install/

What are you attempting to do
I would like to install the site using postgres driver over a local socket. Ideally via the correct --db-url value, but redirecting some yml config is fine too.

I think it should be something along the lines of
--db-url="pgsql://drupal:drupal@/drupal?host=${PGHOST}?port=${PGPORT}
Where PGHOST is the full file path to the dir containing the socket.

I have tried quite a few variations. At times the error message suggest it needs the host defined as in drupal:drupal@localhost/drupal or that drush is still looking at port 5432 when my PGPORT is 5433. I have also tried including unix_socket= similar to the mysql driver. And I have hard coded all the values rather than rely on the env vars too as well as tried to get around the db-url param:

drush --debug -vvv --no-interaction --config=- site:install drupal_cms_installer << EOF
database:
  default:
    database: drupal
    username: drupal
    password: drupal
    host: /home/tom/Projects/dcms/.devbox/virtenv/postgresql/host
    port: 5433
    driver: pgsql

command:
  site:
    install:
      options:
        account-name: admin
        account-pass: drupal
        site-name: 'Your Site Name'
        account-mail: '[email protected]'
        sites-subdir: default
        locale: en
EOF

In what way is the existing documentation unclear or incomplete
For site:install the docs say that it accepts Drupal 10 style db urls but I can not find specs on what D10 db urls are for postgres & sockets.

Note: docs on the sql cmd says it accepts Drupal 6 style db urls rather than D10.

What should the documentation say instead?
Adding an example for postgres and a local socket would suffice. Linking to the Drupal 10 db url specs would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant