Discover Packages
github.com/semichkin-gopkg/airc
module
Version:
v0.0.6
Opens a new window with list of versions in this module.
Published: Jan 30, 2023
License: GPL-3.0
Opens a new window with license information.
README
README
¶
Air toml config builder
A tool for generating .toml config for air with using ENV.
You can see the full list of supported env variables here
Installing
go install github.com/semichkin-gopkg/airc/cmd/airc@v0.0.6
Usage
AIRC_ROOT=/app AIRC_BUILD_INCLUDE_EXT=go,html airc build -o path/to/output/.air.toml
Integration with docker
You can use this docker image for building your go application with live reloading.
Configuration for air stored inside a container, and you can modify it with AIRC_... env variables.
Examples
You can omit AIRC variables if your main.go file located in /app/cmd/app/main.go
version: "3.9"
services:
some_go_application:
image: semichkin/airc:latest
volumes:
- ./src/some_go_application:/app
If your main.go file located in another place, you can specify it by AIRC variables
version: "3.9"
services:
some_go_application:
image: semichkin/airc:latest
environment:
- AIRC_ROOT=/some_go_application
- AIRC_BUILD_CMD_PATH_TO_SOURCE=$$AIRC_ROOT/cmd/api/main.go
- AIRC_BUILD_KILL_DELAY=2s
- ETC=...
volumes:
- ./src/some_go_application:/some_go_application
Expand ▾
Collapse ▴
Directories
¶
cmd
internal
Click to show internal directories.
Click to hide internal directories.