Skip to content

Commit

Permalink
use docker-compose instead of docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-korotya committed Apr 25, 2024
1 parent 4c396c2 commit e8c2d93
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ Example:
```

## How to run:
1. Build the docker container:
1. Run docker-compose file:
```bash
docker build -t refresh-service:local .
```
2. Run the docker container:
```bash
docker run --env-file .env -v ./config.yaml:/app/config.yaml -p 8002:8002 refresh-service:local
docker-compose up -d
```
12 changes: 12 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'
services:
refresh-service:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./config.yaml:/app/config.yaml:ro
ports:
- 8002:8002
env_file:
- .env
2 changes: 0 additions & 2 deletions server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package server
import (
"io"
"net/http"
"strings"
"time"

"github.com/0xPolygonID/refresh-service/logger"
Expand Down Expand Up @@ -65,7 +64,6 @@ func (h *Handlers) Run(host string) error {
}
})

host = strings.Trim(host, "\"")
logger.DefaultLogger.Infof("Server starting on host '%s'", host)
httpServer := &http.Server{
Addr: host,
Expand Down

0 comments on commit e8c2d93

Please sign in to comment.