-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker-compose example #320
Comments
Hey. I am no expert at postgis/postgres/docker/docker-compose, but I got itchy reading your problem. The only difference between your docker command and docker-compose file is volume. When I commented it out:
Container starts normally.
I googled a bit and found out you might just want to create named volume of postgres' data directory. Such docker-compose.yml works as well.
I am still not sure what is the original root of problem, whether setting volume in current directory or setting it to whole /etc of container, but the result is container did not have env variables passed on. I don't have more time right now, but it's interesting for me, maybe I will dig deeper later on :) If you actually found out what's wrong, please answer, I would appreciate it. |
D: Still can't do it works! Without volume works, with that folder works, but with If the folder is detected as valid:
If docker says its no valid
I have tested every solution here: ClusterHQ/dvol#67 |
Hey @latot, I actually encountered the same problem with my other project, so I dove a little deeper. There are two types of mounting filesystem to docker container, namely:
Now, bind mounts have following syntax:
And volumes:
Now we thought we were using volumes, but we were using bind mounts:
But when I provided alternative solution:
Finally, this is
And running this creates named volume:
So that solves it I guess :) |
Hi all, I don't know why, but run postgis with docker run is so easy, but with docker compose so hard u.u
This works great:
But the next one fails!
with:
I really don't get why one works and the other not, maybe there is a tricky thing about docker-compose.
Well, there is the chance, this problem is in postgres image and not postgis, but lets start :)
Thx!
The text was updated successfully, but these errors were encountered: