-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 up Error #181
Comments
@aadeshkulkarni you can configure the file sharing by going to settings. it works for me. |
I have tried doing this. But Docker does not let me create a directory for that address. (Using MacOS) There was one more individual who was facing this issue in discord |
hey @aadeshkulkarni, I am the author of Dockerfile for this repo. TY |
Also, @aadeshkulkarni this has been resolved. It's just the way docker is wired in mac os. |
Configuring the file sharing by going to settings didn't work for me. I have changed the postgres volume to make it work for now. Can you confirm if Issue#2 is reproducible ? @devsargam & @geekyharsh05 |
@aadeshkulkarni haven't reproduced but your point seems valid. |
@devsargam what if you try this approach, instead of using absolute path we can use relative path, so it'll become easy for anyone to setup the project using docker. Is it a right approach? volumes:
- ./postgres-data:/var/lib/postgresql/data |
This PR #182 has the solution @geekyharsh05 mentioned above for issue #1. It also has issue #2 resolution. but keeping the PR as draft until #2 is reproducible by someone else. Edit: |
Just in case did you do |
Yes, removed db volume on the local host by deleting the Then |
Description:
docker-compose up
returns the following errors:Mounts denied
error for the db host volume address. (for Mac specifically) ( Screenshot attached below )(Which when resolved by changing the host address, returns the next error)
Error P1001: Can't reach database server.
The
cms-app
docker container runs the migration script even before thecms-db
docker container is up. (Error Screenshot attached below)Details on Issue 2:
By default, Docker Compose only ensures that the services listed under the
depends_on
property are started before the dependent service. This means that Compose doesn't guarantee that these services are fully operational and ready to process requests, but only that their containers are running.It is however possible to set conditions to define when one service should start or wait for another service to reach a specific state. These conditions are defined in the
condition
property and take three possible values:service_started
,service_healthy
, andservice_completed_successfully
.Proposed Solution:
cms-app
container to wait for thecms-db
container to reach a specific state before running the migration script.Steps to Reproduce the issue
docker-compose up
command on a local machine.Additional resources
https://www.warp.dev/terminus/docker-compose-depends-on
Proposed solution
https://github.com/peter-evans/docker-compose-healthcheck
Screenshots
Issue 1 (Mount fail)
Issue 2 (container cms-app starting before starting cms-db service is healthy)
The text was updated successfully, but these errors were encountered: