From 6c4eb8db1ada812d6d6bfb8c06a657c220103795 Mon Sep 17 00:00:00 2001 From: Rustem Kamalov Date: Sun, 25 Jun 2023 20:39:14 +0300 Subject: [PATCH] Radme and default configs fix --- .gitignore | 4 +++- README.md | 11 +++++------ config.yaml | 2 +- docker-compose.yaml | 5 +++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 420c5f8..6c8a434 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ raw.go dev.md .gitignore logrus.txt -logs.txt \ No newline at end of file +logs.txt +.release +core/test/ diff --git a/README.md b/README.md index 906251d..8a694a9 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,13 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/karust/openserp)](https://goreportcard.com/report/github.com/karust/openserp) [![Go Reference](https://pkg.go.dev/badge/github.com/karust/openserp.svg)](https://pkg.go.dev/github.com/karust/openserp) - - +[![release](https://img.shields.io/github/release-pre/karust/openserp.svg)](https://github.com/derailed/k9s/releases) + API access for search engines results if available isn't free. Using OpenSERP, you can get search results from **Google**, **Yandex**, **Baidu** via API or CLI! -See [Docker](#docker), [CLI](#cli) usage examples below. +See [Docker](#docker) and [CLI](#cli) usage examples below. ## Docker usage 🐳 * Run API server: @@ -18,13 +17,13 @@ See [Docker](#docker), [CLI](#cli) usage examples below. # Use prebuilt image docker run -p 127.0.0.1:7000:7000 -it karust/openserp serve -a 0.0.0.0 -p 7000 -# Or +# Or build one and run using docker-compose.yaml docker-compose up --build ``` ### *Example request* Get 20 **Google** results for `hello world`, only in English: -```JSON +``` GET http:/127.0.0.1:7000/google/search?lang=EN&limit=20&text=hello world ``` You can replace `google` to `yandex` or `baidu` in query to change search engine. diff --git a/config.yaml b/config.yaml index 2779ffb..42507d6 100644 --- a/config.yaml +++ b/config.yaml @@ -5,4 +5,4 @@ app: verbose: true timeout: 15 head: false - leakless: true + leakless: false diff --git a/docker-compose.yaml b/docker-compose.yaml index 08f7a74..65192bd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,7 +3,8 @@ version: '3' services: openserp: container_name: serp - image: openserp + build: + context: . ports: - 7000:7000 - command: serve -a 0.0.0.0 -p 7000 \ No newline at end of file + command: serve -a 0.0.0.0 -p 7000 -v -l \ No newline at end of file