Sign inSign up

kimyvgy/gowatch

By kimyvgy

•Updated over 4 years ago

Develop Golang apps by automatically restarting/rebuilding the application when file changes

Image
1

305

kimyvgy/gowatch repository overview

⁠kimyvgy/gowatch

This docker image provides gowatch script & nodemon that helps develop Golang applications by automatically restarting/rebuilding the application when file changes in the directory are detected.

⁠Usage

# attach into `golang` container:
docker exec -it golang sh

# run *.go file & watch files change
gowatch run ./cmd/server/main.go start

# build *.go to binary file
# watch files change to rebuild to binary
gowatch build ./cmd/server/main.go -o ./build/server

⁠Setup

# docker-compose.yml
version: "3.7"

services:
    golang:
        image: kimyvgy/gowatch:1.17-alpine
        tty: true
        working_dir: /src
        volumes:
            - ./project:/src

⁠Build

# buid all versions:
make build

# build for one:
make build TAG=1.17-alpine

⁠References

Tag summary

Content type

Image

Digest

Size

142.3 MB

Last updated

over 4 years ago

docker pull kimyvgy/gowatch:1.13-alpine