Skip to content

Commit

Permalink
feat: add make (#12)
Browse files Browse the repository at this point in the history
* created makefile for easy docker building and interaction

* doing some cleanup

* get rid of start target

* updated readme

Co-authored-by: Munyao Kelvin <[email protected]>
  • Loading branch information
Marsh-sudo and Munyao Kelvin authored Jan 3, 2023
1 parent d45dda3 commit b96027d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
build:
docker-compose -f docker-compose.yml build $(c)
up:
docker-compose -f docker-compose.yml up -d $(c)
down:
docker-compose -f docker-compose.yml down $(c)
destroy:
docker-compose -f docker-compose.yml down -v $(c)
stop:
docker-compose -f docker-compose.yml stop $(c)
restart:
docker-compose -f docker-compose.yml stop $(c)
docker-compose -f docker-compose.yml up -d $(c)
ps:
docker-compose -f docker-compose.yml ps
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Light-weight API in front of [yearn.vision](https://yearn.vision) that makes some data available for external sites.

## Usage
Start the API with `docker-compose up` or `docker-compose up -d` for detached mode. This will expose it at `http://localhost:5000`.
Start the API with `make up`.This will expose it at `http://localhost:5000`.

## Rebuild
Rebuild the docker container with `docker build -t ghcr.io/yearn/yearn-exporter-api .`
Rebuild the docker container with `make build`

## Configuration
You can export the following environment variables if you want to override the defaults:
Expand Down

0 comments on commit b96027d

Please sign in to comment.