Skip to content

Commit

Permalink
docker: add dns
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 committed Mar 24, 2024
1 parent 62f284c commit 2fdde76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,12 @@ docker-compose up --build
```
___
## 3) Docker
**build**
```python3
docker build -t duckduckgo_search .
# build
docker build -t ddgs .
# run
docker run -d --name ddgs -p 8000:8000 --dns 1.1.1.1 --dns 8.8.8.8 ddgs
```

**run**
```python3
docker run -d --name ddg -p 8000:8000 duckduckgo_search
```
or
```python3
docker run -d --network host --name ddg -p 8000:8000 duckduckgo_search
```

___
## 4) Test
```python3
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ services:
ddgs:
build:
context: .
network: host
command: uvicorn duckduckgo_search_api.main:app --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
- "8000:8000"
dns:
- 1.1.1.1
- 8.8.8.8

0 comments on commit 2fdde76

Please sign in to comment.