https://github.com/shyce/go-project-template
Docker golang project template. Automatically compile golang binary as you code.
https://github.com/shyce/go-project-template
compiler docker docker-compose go golang template
Last synced: 5 months ago
JSON representation
Docker golang project template. Automatically compile golang binary as you code.
- Host: GitHub
- URL: https://github.com/shyce/go-project-template
- Owner: shyce
- Created: 2020-09-27T18:14:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-27T05:51:49.000Z (over 4 years ago)
- Last Synced: 2023-07-21T20:42:38.159Z (almost 3 years ago)
- Topics: compiler, docker, docker-compose, go, golang, template
- Language: Dockerfile
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Project Template: Automatically compile as you code.
### Step 1: Copy file
Copy `.env.example` file to `.env` and (optional) set `GO_BINARY` variable. This will allow you to mount `/usr/build` directory inside the container to use binary in pipeline if needed.
### Step 2: Run
To start monitoring and automatically building code, just run:
```
docker-compose up -d
```
### Step 3: Code
You can start changing `main.go` or adding and linking files. To see the result, just run:
```
docker-compose logs -f
```
### Tips:
1. Race mode is enabled by default. To change this, update: ./docker/golang/entrypoint.sh