added a lttle bit more concise of an update to the docker part of tje readme
This commit is contained in:
parent
3ed388bd6d
commit
71a490b7fd
1 changed files with 20 additions and 8 deletions
26
README.md
26
README.md
|
@ -1,20 +1,23 @@
|
||||||
# Pastebinner
|
# Pastebinner
|
||||||
Check out the examples folder for some examples. I will add more soon.
|
Check out the examples folder for some examples. I will add more soon.
|
||||||
|
|
||||||
## Usage
|
## Configuration
|
||||||
### Configuration
|
|
||||||
|
|
||||||
### Docker
|
#### Docker
|
||||||
- build the image:
|
- Build the image:
|
||||||
```shell
|
```shell
|
||||||
docker build -t pastebinner .
|
docker build -t pastebinner .
|
||||||
```
|
```
|
||||||
- run the image:
|
- Run the image:
|
||||||
```shell
|
```shell
|
||||||
docker run -it --env-file .env --network="host" pastebinner
|
docker run -it --env-file .env --network="host" pastebinner
|
||||||
```
|
```
|
||||||
|
#### Console
|
||||||
|
|
||||||
Set the following environment variables and source them:
|
The console will launch you into a running pry session where you will have access to an elasticsearch object and a pastebinner object. From there you can poke around and investigate further how the program works.
|
||||||
|
|
||||||
|
I am working on setting it up with docker-compose to connect elasticsearch and redis in docker containers.
|
||||||
|
Set the following environment variables in a file named .env and source them:
|
||||||
|
|
||||||
```
|
```
|
||||||
pastebin_api_key
|
pastebin_api_key
|
||||||
|
@ -22,8 +25,17 @@ pastebin_username
|
||||||
pastebin_password
|
pastebin_password
|
||||||
```
|
```
|
||||||
|
|
||||||
|
optional environment variables if planning on using elasticsearch and redis
|
||||||
|
```
|
||||||
|
elasticsearch_url
|
||||||
|
redis_url
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
If you want to scrape pastes, you can view a json response of the latest pastes by using the ```-s``` or ```--scrape_public``` options.
|
If you want to scrape pastes, you can view a json response of the latest pastes by using the ```-s``` or ```--scrape_public``` options.
|
||||||
Creating pastes is built in, check ```lib/api_client.rb```, I am still working on adding in the functionality to use it on the command line.
|
Creating pastes is built in, check ```lib/api_client```
|
||||||
|
|
||||||
|
#### Commandline
|
||||||
The command line app can be used as follows:
|
The command line app can be used as follows:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
Loading…
Add table
Reference in a new issue