Closed ZimbiX closed 3 years ago
@ZimbiX thanks for bringing this up. This looks like a very simple change and backwards compatible. You can go ahead and open the PR and we will review it. Please ensure that any documentation is updated with this change.
Thank you @ZimbiX
Are there any updates?
Addressed with https://github.com/amberframework/amber/pull/1257
Description
Following Amber's Getting Started guide, but using the provided Docker Compose
db
service instead of installing Postgres, results in an error, since the database does not expose its port:I wasn't sure whether to file this issue here or on the docs repo, since it probably affects both. I chose here because I reckon there's a code change required: to expose the port.
Steps to Reproduce
Follow the Getting Started guide for the most part:
Install dependencies:
Install
crystal
andamber
:Install a database:
Instead of the linked official Postgres installation guide, prepare to make use of the included Docker Compose Postgres
db
service by installing Docker Compose and Docker:Generate a new Amber application
Generate a resource
Create and migrate the database
First, start the
db
Docker Compose service:Now attempt to migrate it:
Expected behavior: The database gets migrated
Actual behavior: Error shown
Reproduces how often: Always
Versions
Resolution
I propose that:
The Docker Compose service expose the port:
Or, if you don't want to do that by default to avoid conflicting with an installed Postgres, have the lines in there commented out, with a comment like:
I have other suggestions regarding the Docker Compose setup; I might make separate issues for those.