depl
depl copied to clipboard
Order of deploy items should not matter
When defining django before postgresql in depl.yml, things don't work. There should be a way to declare dependencies, so that the order of declaration doesn't matter.
Oh, actually it's a different problem. When django auto-detects postgres, it wants to run the postgres deployment using the following settings:
{'user': None, 'password': None, 'id': 'auto_dectect_django_0', 'database': u'interna'}
The user and password are empty because my local database does not need authentication.
There should be a way to explicitly state the desired postgres configuration. And the Django deployment should be able to handle database configs without authentication config.
The order of declaration matters. That might not be documented clearly but it does. Being inspired by travis-ci, you can do things like:
deploy:
- sh: echo "before command"
- django
- sh: echo "after command"
However that bug obviously shouldn't happen. There is a way to explicitly specify postgresql users. I just don't understand how you configure your database if there's no user. What do you modify?
There is a user, but I use peer authentication (http://www.postgresql.org/docs/9.1/static/auth-methods.html#AUTH-PEER) with local unix domain sockets for connection. So no username/password needed in the configuration.
Hmm. That sounds good. But do you need to do something else than sudo apt-get install postgresql to enable that authentication?
On some systems you need to edit pg_hba.conf. Not on Arch, but I think on Debian.
There's even on Ubuntu machines a
local all all peer
line in pg_hba.conf. But: What do we need to do additionally, if we create a database? It typically needs an owner, doesn't it?
Yes, but if you just create a database using createdb, the owner is the currently logged in user. And if that's the same user that runs the Django app, no other configuration (e.g. username) is needed.
All right. So basically that table would be owned by www-data, if you want to use defaults (deploying to /usr/www).
Yes.