Dockerfile & docker compose not working as expected.
Opened this issue · 0 comments
7adidaz commented
I'm trying to run the docker compose up
to utilize docker for easier development time. Still, I ran into the example
container not being able to connect to the postgres
container, checking the env
variables related to postgres in docker-compose.yaml
. I saw both POSTGRES_PASSWORD
being different from the one present in the Postgres link in config.toml
, it should be edited from:
"postgresql://postgres:root@127.0.0.1:5432/fiber_starter"
"postgresql://postgres:postgres@127.0.0.1:5432/fiber_starter"
Another edit is the following in the Dockerfile
:
"RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o /bin/api-binary ./cmd/example/main.go"
"RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o /bin/api-binary ./cmd/main.go"
I was gonna open a PR but it still refuses to connect to postgres
container, please investigate this and thanks for this amazing boilerplate:)