Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added doc.go and pkg.go.dev badge #40

Merged
merged 1 commit into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A tool that makes debugging of Dockerized Go applications super easy by enabling
![](https://github.com/moshebe/gebug/workflows/test/badge.svg)
![](https://github.com/moshebe/gebug/workflows/telegram/badge.svg)
[![codecov](https://codecov.io/gh/moshebe/gebug/branch/master/graph/badge.svg)](https://codecov.io/gh/moshebe/gebug)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/moshebe/gebug)](https://pkg.go.dev/github.com/moshebe/gebug)
[![Go Report Card](https://goreportcard.com/badge/github.com/moshebe/gebug)](https://goreportcard.com/report/github.com/moshebe/gebug)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
---
Expand Down
42 changes: 42 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
Gebug is a tool that makes debugging of Dockerized Go applications super easy by enabling Debugger and Hot-Reload features, seamlessly.


The implementation is based on utilizing Docker and Docker-Compose to manage the debugging environment.
In order to get a consistent and clean environment, the application build is taking place inside a Docker container.
This make the debugging process agnostic to the host's libraries and tools versions. For instance, you can choose to work a specific
version of Go on your host, but use another one when debugging your application.


How it works

During the `init` process, the user sets the desired configuration to the project including
Docker base, environment variables and expose ports.
When the user runs `start` (unless explicitly asked) a `Dockerfile` and `docker-compose.yml` with the relevant configuration
including one-direction source files synchronization between the host and the runtime container and auto-build on each change detected.

Configurations



output_binary - output binary artifact inside the runtime container (default: "/app")
build_command - build command inside the runtime container (default: "go build -o {{.output_binary}}")
run_command - run command, probably most of the time will just be the binary artifact path (default: "{.output_binary}}")
runtime_image - base Docker image for the runtime container (default: "golang:1.14")
debugger_enabled - whether to enable delve debugger inside the container or just use hot-reload (default: false)
debugger_port - delve debugger listen port, relevant only if debugger_enabled was set (default: 40000)
expose_ports - list of ports to expose inside the container (default: [])
networks - list of docker external networks to join. if no network is selected, a new one will be created (default: [])
environment - list of environment variables to be set inside the container (default: [])


Notes & Tips

- Note you can reference other configuration fields.
- When enabling Debugger -gcflags="all=-N -l" will be appended to the build command to stop compiler optimization and symbol removing.
- No need to add the delve debugger listen port as it will be auto-added
- Expose ports use the same syntax as docker-compose for mapping between host and container ports (e.g: "8080:8080")
- Environment variables syntax: FOO=BAR or just FOO which will take the variable FOO from host and set it with its value

*/
package main