{"action":"created","issue":{"url":"https://api.github.com/repos/drone/drone/issues/1436","repository_url":"https://api.github.com/repos/drone/drone","labels_url":"https://api.github.com/repos/drone/drone/issues/1436/labels{/name}","comments_url":"https://api.github.com/repos/drone/drone/issues/1436/comments","events_url":"https://api.github.com/repos/drone/drone/issues/1436/events","html_url":"https://github.com/drone/drone/issues/1436","id":128778485,"number":1436,"title":"drone 0.4 database ping failed","user":{"login":"valentinbud","id":3338528,"avatar_url":"https://avatars.githubusercontent.com/u/3338528?v=3","gravatar_id":"","url":"https://api.github.com/users/valentinbud","html_url":"https://github.com/valentinbud","followers_url":"https://api.github.com/users/valentinbud/followers","following_url":"https://api.github.com/users/valentinbud/following{/other_user}","gists_url":"https://api.github.com/users/valentinbud/gists{/gist_id}","starred_url":"https://api.github.com/users/valentinbud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentinbud/subscriptions","organizations_url":"https://api.github.com/users/valentinbud/orgs","repos_url":"https://api.github.com/users/valentinbud/repos","events_url":"https://api.github.com/users/valentinbud/events{/privacy}","received_events_url":"https://api.github.com/users/valentinbud/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2016-01-26T10:03:26Z","updated_at":"2016-04-18T16:49:28Z","closed_at":"2016-01-26T19:27:19Z","body":"First of all allow me to tell you that I think drone is an exquisite piece of technology that's very easy to understand and use. Thank you for sharing :).\r\n\r\nI am trying to deploy drone 0.4 with Postgres Database located in another container.\r\n\r\n```\r\n$ docker run -d --name drone-postgres -e POSTGRES_USER=drone -e POSTGRES_DB=drone -e POSTGRES_PASSWORD=drone postgres\r\n```\r\n\r\nI have verified that the database is up and running with another docker container.\r\n\r\n```\r\n$ docker run -it --link drone-postgres:postgres --rm postgres sh -c 'exec psql -h \"$POSTGRES_PORT_5432_TCP_ADDR\" -p \"$POSTGRES_PORT_5432_TCP_PORT\" -U drone'\r\n```\r\n\r\nAfter entering `drone` password I am inside a psql shell. I suppose it is working.\r\n\r\nNext I have run drone with environment variables.\r\n\r\n```\r\n$ docker run --rm -it -e DATABASE_DRIVER=postgres -e DATABASE_CONFIG=postgres://drone:drone@172.17.0.2:5432/drone drone/drone:0.4\r\n\r\nINFO[0000] using database driver postgres\r\nINFO[0000] using database config postgres://drone:drone@172.17.0.2:5432/drone\r\nINFO[0000] database ping failed. retry in 1s\r\nINFO[0001] database ping failed. retry in 1s\r\nINFO[0002] database ping failed. retry in 1s\r\nINFO[0003] database ping failed. retry in 1s\r\nINFO[0004] database ping failed. retry in 1s\r\nINFO[0005] database ping failed. retry in 1s\r\nINFO[0006] database ping failed. retry in 1s\r\nINFO[0007] database ping failed. retry in 1s\r\nINFO[0008] database ping failed. retry in 1s\r\nINFO[0009] database ping failed. retry in 1s\r\nINFO[0010] database ping failed. retry in 1s\r\n```\r\n\r\nThe IP Address is from `docker inspect drone-postgres`. Could you please tell what have I done wrong or another way to deploy drone with Postgres, both in docker containers.\r\n"},"comment":{"url":"https://api.github.com/repos/drone/drone/issues/comments/211469931","html_url":"https://github.com/drone/drone/issues/1436#issuecomment-211469931","issue_url":"https://api.github.com/repos/drone/drone/issues/1436","id":211469931,"user":{"login":"bradrydzewski","id":817538,"avatar_url":"https://avatars.githubusercontent.com/u/817538?v=3","gravatar_id":"","url":"https://api.github.com/users/bradrydzewski","html_url":"https://github.com/bradrydzewski","followers_url":"https://api.github.com/users/bradrydzewski/followers","following_url":"https://api.github.com/users/bradrydzewski/following{/other_user}","gists_url":"https://api.github.com/users/bradrydzewski/gists{/gist_id}","starred_url":"https://api.github.com/users/bradrydzewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradrydzewski/subscriptions","organizations_url":"https://api.github.com/users/bradrydzewski/orgs","repos_url":"https://api.github.com/users/bradrydzewski/repos","events_url":"https://api.github.com/users/bradrydzewski/events{/privacy}","received_events_url":"https://api.github.com/users/bradrydzewski/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T16:49:28Z","updated_at":"2016-04-18T16:49:28Z","body":"> I am using Docker via a user with sudo level access\r\n\r\nDoesn't the Docker deamon run as root [1]? Have you made any custom configuration to your Docker installation or to its default deamon settings? Have you added any additional runtime flags?\r\n\r\n[1] https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface\r\n\r\n> create script I could use to premake the sqlite file \r\n\r\nIt is unlikely this would make a difference. If libsqlite cannot create the database it is unlikely it will be able to open the file with a write lock."}}