ohardy / dokku-psql Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Is this plugin compatibe with: http://progrium.viewdocs.io/dokku/configuration-management ?
How are env variables set? I see psql env variables, but config variables are missing, does it override default behaviour?
$ 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
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"
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?
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
.
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.
$
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.