DEV Community

Discussion on: 📖 Build a RESTful API on Go: Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers

Collapse
 
alexbezverkhniy profile image
Alexander Bezverkhniy • Edited

Great tutorial! Like your style, "less water" )).

I got some issues during migrate installation:

❯ go get github.com/golang-migrate/migrate            
go get: added github.com/golang-migrate/migrate v3.5.4+incompatible
Enter fullscreen mode Exit fullscreen mode

I have go version go1.17.1 and linux/amd64 (Arch linux)

BTW I've fixed that by building it from the source.

Just thoughts... I guess you can simplify "Docker related steps" by using docker-compose.

Collapse
 
koddr profile image
Vic Shóstak • Edited

Hi,

Thanks for reply!

I got some issues during migrate installation [...]

If you have some problems with local installation golang-migrate/migrate, try Docker-way of them, like this:

docker run \
  -v ${PWD}:/migrations \
  --network host \
  migrate/migrate \
    -path=/migrations/ \
    -database postgres://localhost:5432/database up
Enter fullscreen mode Exit fullscreen mode

[...] I guess you can simplify "Docker related steps" by using docker-compose.

It's cool that you noticed this, but I did it on purpose to show the full setup for beginners... 😉 Also, I personally like to use Ansible playbooks instead of docker-compose to deploy the project to live servers (if that's what you want to roll out), but that would be too much for an already large tutorial.

Collapse
 
alexbezverkhniy profile image
Alexander Bezverkhniy

Thank you Vic! Gonna try that.