Skip to content
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] don’t expose ports and change pg volume name #302

Closed
wants to merge 1 commit into from

Conversation

matthewbennink
Copy link
Contributor

No description provided.

@matthewbennink
Copy link
Contributor Author

Sorry, meant for this to be local to our project.

@krschacht
Copy link
Contributor

@matthewbennink No problem. But that's a good idea to change the volume name, I should do make that change for everyone. But do you think others will want the ports closed or is that specific to what you're doing? I assume that's specific to some testing you're doing because I don't think the app will work with the ports are closed, although I'm not actually sure of that.

@matthewbennink
Copy link
Contributor Author

I'll provide some context, which may help.

For the ports, it was because the ports were already in use on my machine. At first, I tried to simply change them, but that required changing them within all of the connection strings as well. I was pleasantly surprised to notice that my local Docker setup was such that the containers were able to communicate with each other on those ports without them needing to be exposed on the host machine. I won't be able to access with psql or redis-cli from the host, but I am able to run on port 3000 (which I made sure was open) and I'm also able to access through docker compose run base rails console.

As for the volume, it's because I received PostgreSQL Database directory appears to contain a database; Skipping initialization, and that's likely because some other Docker Compose file had a pgdata volume somewhere.

In summary, these changes were enough for me to run docker compose up locally and have a functioning app.

@krschacht
Copy link
Contributor

krschacht commented Apr 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants