diff --git a/README.md b/README.md index 265b4b34..1abe891e 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Note: This tool has nothing to do with hot-deploy for production. * Allow watching new directories after Air started * Better building process -### Overwrite specify configuration from arguments: +### Overwrite specify configuration from arguments Support air config fields as arguments: @@ -72,7 +72,6 @@ curl -sSfL https://goblin.run/github.com/cosmtrek/air | PREFIX=/tmp sh ### Docker/Podman - Please pull this docker image [cosmtrek/air](https://hub.docker.com/r/cosmtrek/air). ```bash @@ -84,15 +83,17 @@ docker/podman run -it --rm \ cosmtrek/air -c ``` + #### Docker/Podman .${SHELL}rc if you want to use air continuously like a normal app, you can create a function in your ${SHELL}rc (bash,zsh,etc...) + ```bash air() { - podman/docker run -it --rm \ - -w "$PWD" -v "$PWD":"$PWD" \ - -p "$AIR_PORT":"$AIR_PORT" \ - docker.io/cosmtrek/air "$@" + podman/docker run -it --rm \ + -w "$PWD" -v "$PWD":"$PWD" \ + -p "$AIR_PORT":"$AIR_PORT" \ + docker.io/cosmtrek/air "$@" } ``` @@ -102,21 +103,23 @@ if you want to enter the container, Please add --entrypoint=bash.
For example -- One of my project runs in docker: +One of my project runs in docker: ```bash docker run -it --rm \ - -w "/go/src/github.com/cosmtrek/hub" \ - -v $(pwd):/go/src/github.com/cosmtrek/hub \ - -p 9090:9090 \ - cosmtrek/air + -w "/go/src/github.com/cosmtrek/hub" \ + -v $(pwd):/go/src/github.com/cosmtrek/hub \ + -p 9090:9090 \ + cosmtrek/air ``` -- Another example: +Another example: + ```bash cd /go/src/github.com/cosmtrek/hub AIR_PORT=8080 air -c "config.toml" ``` + this will replace `$PWD` with the current directory, `$AIR_PORT` is the port where to publish and `$@` is to accept arguments of the aplication itself for example -c
@@ -288,7 +291,7 @@ git push origin v1.xx.x ## Sponsor -Buy Me A Coffee +[![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/default-orange.png)](https://www.buymeacoffee.com/cosmtrek) Give huge thanks to lots of supporters. I've always been remembering your kindness.