Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spagettikod/goreload
https://github.com/spagettikod/goreload
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/spagettikod/goreload
- Owner: spagettikod
- Created: 2024-04-14T08:26:17.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-12T19:12:18.000Z (7 months ago)
- Last Synced: 2024-10-19T08:38:42.790Z (2 months ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# goreload
Dead simple container to run your Go application daemon and restart it when files change. Just mount your project root to `/app`.Example:
```
docker run \
--rm \
-it \
-p 8080:80 \
-v $(pwd):/app \
ghcr.io/spagettikod/goreload
```You can also supply your own script to execute at each reload by mounting a script to destination `/doer.sh`:
```
docker run \
--rm \
-it \
-p 8080:80 \
-v $(pwd):/app \
-v $(pwd)/my_custom.sh:/doer.sh \
ghcr.io/spagettikod/goreload
```## Development
Documentation for development of `goreloader`.### Testing
```
docker build -t ghcr.io/spagettikod/goreload:1.1.0 .
```Testing the built-in script:
```
docker run --rm -it -v $(pwd)/tester:/app ghcr.io/spagettikod/goreload:1.1.0
```Testing a custom script:
```
docker run --rm -it -v $(pwd)/tester:/app -v $(pwd)/tester/custom_doer.sh:/doer.sh ghcr.io/spagettikod/goreload:1.1.0
```### Build
Build new version:
```
docker build -t ghcr.io/spagettikod/goreload:1.1.0 -t ghcr.io/spagettikod/goreload:latest .
```