faradayio / cage

Develop and deploy complex Docker applications
http://cage.faraday.io
Apache License 2.0
307 stars 26 forks source link

./examples/tutorial.sh is broken #78

Open emk opened 6 years ago

emk commented 6 years ago

beta is failing because it runs one important test that stable skips. To run this locally, run:

cd cage
cargo install -f
./examples/tutorial.sh

I'm investigating, but please feel free to take a look if you want.

CC @camjackson

emk commented 6 years ago

From the logs:

waiting for server to start....2017-10-18 16:00:26.569 UTC [41] FATAL:  data directory "/var/lib/postgresql/data" has group or world access
2017-10-18 16:00:26.569 UTC [41] DETAIL:  Permissions should be u=rwx (0700).
 stopped waiting
pg_ctl: could not start server
Examine the log output.

Looks like cage new is producing broken output, probably because https://github.com/faradayio/cage/blob/master/data/templates/new/pods/db.yml is not setting up a working set of directory permissions. Not sure how easy this will be to fix.

emk commented 6 years ago

OK, the underlying problem here is actually with the standard Docker postgres containers. They no longer reliably allow you to mount newly-created named volumes. I've switched to the Alpine version of the PostgreSQL container, which seems to work a bit better, but may not be a complete fix.

camjackson commented 6 years ago

That seems like a pretty big limitation :/

Is there an open issue somewhere where that's being discussed?

emk commented 6 years ago

I've seen a couple different issues on various PG Docker containers, but I haven't actually found the repo for the official upstream container.

Given that this issue existed with 0.2.2, for a while, and that it's going to take some time to fix, I'm going to release 0.2.3 anyway and get the other fixes out, and bump this to 0.2.4.