From 159a6e38c88ea8aaa5dd37a69c68f6f0929262cf Mon Sep 17 00:00:00 2001 From: Muhammad Hussein Fattahizadeh Date: Wed, 10 May 2023 09:14:21 +0330 Subject: [PATCH] feat: add docker-compose.yml --- README.md | 2 +- docker-compose.yml | 10 ++++++++++ main.go | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 89a7915..749ac63 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For see available options ```bash -docker run --rm ghcr.io/aasaam/ip-info-rest-api:latest -h +docker run --rm ghcr.io/aasaam/ip-info-rest-api:latest run -h ``` ## Usage diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c1c3ae1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3" + +services: + ip-info-rest-api: + image: ghcr.io/aasaam/ip-info-rest-api:latest + container_name: ip-info-rest-api + ports: + - 4000:4000 + hostname: ip-info-rest-api + command: run diff --git a/main.go b/main.go index ec1499f..fee20c6 100644 --- a/main.go +++ b/main.go @@ -71,6 +71,7 @@ func main() { Usage: "Run server", Action: runServer, Flags: []cli.Flag{ + &cli.StringFlag{ Name: "listen", Usage: "Application listen http ip:port address",