Git Product home page Git Product logo

dokku-psql's People

Contributors

abossard avatar ademuk avatar ohardy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dokku-psql's Issues

Cannot start psql

$ dokku psql:start
-----> Starting Postgresql server
e29753546c89263274ce607cf6ebfefbd3c0ccd8d1ee0e96c4777dcfee4a1582
Error response from daemon: Cannot start container e29753546c89263274ce607cf6ebfefbd3c0ccd8d1ee0e96c4777dcfee4a1582: Error starting userland proxy: listen tcp 127.0.0.1:5432: bind: address already in use
-----> Restarting applications

Extra shell args/options for manage commands

Thank you for this useful plugin.

It would be a very useful feature if we could provide extra arguments to commands like dump_sql, restore_sql, etc.

For example we would like to use sql format for backups, but we can't provide such useful arguments like -c or -Z9 to dump_sql command.

Then we could use something like:
dokku:dump_sql app > app.gz --extra-options="-c -Z9"

Is anybody still using this plugin?

In the readme is says "Updating this plugin" but the mentioned request request was merged last November --> Does anybody use this plugin in production environments?

Get the postgres console output code from restore_sql

For a table that exists:

root@r-pkg:~# echo "select NULL foo from daily LIMIT 1" | dokku psql:restore_sql cranlogs
 foo 
-----

(1 row)

root@r-pkg:~# echo $?
0

For a table that does not exist:

root@r-pkg:~# echo "select NULL foo from foobar LIMIT 1" | dokku psql:restore_sql cranlogs
ERROR:  relation "foobar" does not exist
LINE 1: select NULL foo from foobar LIMIT 1
                             ^
root@r-pkg:~# echo $?
0

It would be useful to check if the query finished properly. I could also try to parse the output, but it would be simpler to just return the exit code of psql.

Container exits immediately on psql:start, complains about version

Host: Ubuntu 14.04
/home/dokku/VERSION: v0.2.3-13-g4e9d797

psql:start tries to start a container but it dies immediately.

$ sudo dokku psql:start
-----> Starting Postgresql server
133d42b3b1cf67d5acd508620635a204223b72a7356a677ab34a3a0486fc5c77
-----> Restarting applications

#this will only show the node-js-sample container that is running
$ sudo docker ps
CONTAINER ID        IMAGE                 COMMAND                CREATED             STATUS              PORTS                     NAMES
645965945a36        dokku/sample:latest   "/bin/bash -c '/star   39 minutes ago      Up 39 minutes       0.0.0.0:49159->5000/tcp   trusting_lalande

$ sudo docker ps -a
CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS                      PORTS                     NAMES
72aee52068a9        ohardy/postgresql:latest    "manage start"         5 minutes ago       Exited (1) 5 minutes ago                              condescending_almeida
645965945a36        dokku/sample:latest         "/bin/bash -c '/star   45 minutes ago      Up 45 minutes               0.0.0.0:49159->5000/tcp   trusting_lalande

Printing the logs will give following


$ sudo docker logs 72aee52068a9
2014-09-24 09:50:22 UTC FATAL:  "/var/lib/postgresql/9.3/main" is not a valid data directory
2014-09-24 09:50:22 UTC DETAIL:  File "/var/lib/postgresql/9.3/main/PG_VERSION" is missing.
$ 

Updating DB from within dokku

Hi! Thanks for the great plugin!

I have a question about updating the DB. I would like to keep the updating code within the project, so that everything is at one place. My idea was that I can just call my update script from cron, and run it via dokku run.

Unfortunately DATABASE_URL etc are not available there, and I also cannot call dokku psql:restore_sql from there (or can I?).

Do you have a suggested way of doing this?

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.