Giter Club home page Giter Club logo

Comments (9)

hhff avatar hhff commented on July 30, 2024

huh, seems related to the hyphen. jaime_johnson_staging works fine, as does staging

from dokku-postgres.

josegonzalez avatar josegonzalez commented on July 30, 2024

What is the output of docker ps -a ?

from dokku-postgres.

hhff avatar hhff commented on July 30, 2024

Container is created:

CONTAINER ID        IMAGE                                COMMAND                CREATED             STATUS                    PORTS               NAMES
56c808f753a4        postgres:9.5                         "/docker-entrypoint.   38 seconds ago      Up 38 seconds             5432/tcp            dokku.postgres.database-hyphen

Running the command with dokku trace on shows it looping infinitely with:

+ PGPASSWORD=NWVkNzc4ZmVhYmMw
+ psql --quiet -h 172.17.0.92 -p 5432 -U postgres --command 'CREATE DATABASE database-hyphen;'
+ continue
+ true

from dokku-postgres.

josegonzalez avatar josegonzalez commented on July 30, 2024

Interesting. Looks like postgres hates databases with hyphens in it - and thats how we figure out what the database name should be:

https://stackoverflow.com/questions/10216784/what-is-a-valid-postgresql-database-name

What happens if you add double-quotes around the database name?

from dokku-postgres.

hhff avatar hhff commented on July 30, 2024

Same problem, seems to strip the quotes:

Loop:

+ PGPASSWORD=MWU5NjNiMDNjM2E4
+ psql --quiet -h 172.17.0.93 -p 5432 -U postgres --command 'CREATE DATABASE database-hyphen-with-quotes;'
+ continue
+ true

from dokku-postgres.

Flink avatar Flink commented on July 30, 2024

We may need a function to normalize the DB name (like it’s done in https://github.com/Flink/dokku-psql-single-container/blob/master/functions#L36 for example)

from dokku-postgres.

josegonzalez avatar josegonzalez commented on July 30, 2024

Thats what I'm thinking. We should also make this standard across all datastores (Where a database is "required").

from dokku-postgres.

josegonzalez avatar josegonzalez commented on July 30, 2024

If someone wants to come up with a PR proof of concept for this repo, I can port everywhere else :)

from dokku-postgres.

hhff avatar hhff commented on July 30, 2024

πŸ‘ its a little over my head at the moment

from dokku-postgres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.