How to setup a go watcher with docker + docker-compose. Quick and easy tutorial to setup a watcher that rebuilds on every save or code change.This hot reload, auto save will run the latest code on save.
Video starts off with creating a simple server that runs hello world on localhost:8080. Skip ahead if needed, the timelines can be found in the description. But take note of the project paths and name.
The watcher used: https://github.com/canthefason/go-wat...
0:00 - Create Project + Program
0:29 - Test the application
0:50 - Setup the Dockerfile
1:17 - Setup docker-compose.yml file
2:45 - Run application with docker
3:15 - Example watcher/autosave/hot reload
Alternative Dockerfile command for watcher if you wish to run with go install:
Replace `go get github.com/canthefason/go-watcher/cmd/watcher` with
`go get github.com/canthefason/go-watcher
go install -v github.com/canthefason/go-watcher/cmd/watcher`
Note: Ensure working paths etc are in compliance to Go's code organization.
eg The project path is go/src/github.com/username from github/name of project
🎵 Track Info:
Title: Colorful Flowers by Tokyo Music Walker
Genre and Mood: Pop + Calm
––––––––––––––––––––––––––––––
Colorful Flowers by Tokyo Music Walker / user-356546060
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/al-colorful-flowers
Music promoted by Audio Library • Colorful Flowers – Tokyo Music Walker...
––––––––––––––––––––––––––––––