Skip to content

Commit 2df6405

Browse files
authored
Allow passing proxy list through an environment variable to Docker container (#8)
1 parent 38c4df2 commit 2df6405

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ RUN addgroup --system --gid 1001 go
1111
RUN adduser --system --uid 1001 go
1212
COPY --from=build --chown=go:go /bdo-rest-api .
1313
USER go
14+
ENV PROXY=
1415
EXPOSE 8001
1516
CMD ["/bdo-rest-api"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A scraper for Black Desert Online player in-game data with a REST API. It curren
1010
## How to start using it
1111
There are two ways to use this scraper for your needs:
1212
* By querying https://bdo.hemlo.cc/communityapi/v1 — this is the "official" instance hosted by me.
13-
* If you want to have more control over the API, host the scraper yourself. It's [available on DockerHub](https://hub.docker.com/r/man90/bdo-rest-api) (exposes port 8001), preconfigured for Heroku, and can be built from source as described in [this guide](docs/buildingFromSource.md) (this gives you a bit more control over how the scraper behaves). You can also buitd Docker image on your machine like it's explained [here](docs/buildingDocker.md).
13+
* If you want to have more control over the API, host the scraper yourself. It's [available on DockerHub](https://hub.docker.com/r/man90/bdo-rest-api) (exposes port 8001), preconfigured for Heroku, and can be built from source as described in [this guide](docs/buildingFromSource.md) (this gives you a bit more control over how the scraper behaves). You can also build Docker image on your machine like it's explained [here](docs/buildingDocker.md).
1414

1515
API documentation can be viewed [here](https://man90es.github.io/BDO-REST-API/).
1616

docs/buildingDocker.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ You can run a Docker container you just built by executing this command:
1717
```bash
1818
sudo docker container run bdo-rest-api -p 8001:8001
1919
```
20+
21+
## Environment variables
22+
Use a proxy to make requests to BDO servers (direct by default):
23+
```bash
24+
sudo docker container run bdo-rest-api -p 8001:8001 -e "PROXY=http://123.123.123.123:8080"
25+
# or
26+
sudo docker container run bdo-rest-api -p 8001:8001 -e "PROXY=http://123.123.123.123:8080 http://124.124.124.124:8081"
27+
```

0 commit comments

Comments
 (0)