diff --git a/cmd/main.go b/cmd/main.go index a7f504e..15a15de 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -15,7 +15,12 @@ import ( func main() { - //os.Setenv("HTTP_PROXY", "http://localhost:3000") + if os.Getenv("PORT_PROXY") == "" { + os.Setenv("PORT_PROXY", "3000") + } + if os.Getenv("HTTP_PROXY") == "" { + os.Setenv("HTTP_PROXY", "http://127.0.0.1:"+os.Getenv("PORT_PROXY")) + } proxyForkID := uintptr(0) if runtime.GOOS == "darwin" { diff --git a/docker-compose.yaml b/docker-compose.yaml index d49ceef..6f88883 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,4 +12,12 @@ services: - GODEBUG=netdns=go+4 ports: - "2000:2000" - - "8080:3000" \ No newline at end of file + - "8080:3000" + deploy: + resources: + limits: + cpus: "0.50" + memory: 512M + reservations: + cpus: "0.25" + memory: 128M \ No newline at end of file