airc

module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: GPL-3.0

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
  1. 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
    
  2. 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
    

Directories

Path Synopsis
cmd
internal
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL