https://github.com/dkfbasel/hot-reload
Hot reload development for Go
https://github.com/dkfbasel/hot-reload
docker-container golang hot-reload hot-reloading livereload
Last synced: 6 months ago
JSON representation
Hot reload development for Go
- Host: GitHub
- URL: https://github.com/dkfbasel/hot-reload
- Owner: dkfbasel
- License: mit
- Created: 2016-08-12T10:57:31.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T07:24:37.000Z (12 months ago)
- Last Synced: 2025-03-29T19:07:37.406Z (6 months ago)
- Topics: docker-container, golang, hot-reload, hot-reloading, livereload
- Language: Go
- Homepage:
- Size: 17 MB
- Stars: 129
- Watchers: 7
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
Hot-reload Development for Go in Docker Containers
==================================================This directory contains the source code for the image dkfbasel/hot-reload-go. It
will compile and start the go program linked into the container specified under
directory (/app per default) and automatically recompile and reload the program
when any file changes.Please note that go modules is required for it to work.
```
docker-compose.yml
------------------version: '3'
services:
api:
image: dkfbasel/hot-reload-go:1.20.7
ports:
- "3001:80"
volumes:
# mount the project into the docker container. Must use go modules.
- ..:/app
# mount modules directory from source code or as docker volume to
# cache go modules
- ../_modules:/go/pkg/mod
environment:
# directory to look for the main go entry point (default: /app)
- DIRECTORY=/app
# specify the command that should be run, can be 'build' or 'test'
# 'build' is the default command
- CMD=build
# arguments can be used to specify arguments to pass to the executable
# on running
- ARGS=-test=someString
# ignore will indicate which files and subdirectories to ignore from
# watching, note that the path will be matched from the src directory
- IGNORE=/cmd/web,*.md
```