add limits
This commit is contained in:
@@ -15,7 +15,12 @@ import (
|
|||||||
|
|
||||||
func main() {
|
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)
|
proxyForkID := uintptr(0)
|
||||||
if runtime.GOOS == "darwin" {
|
if runtime.GOOS == "darwin" {
|
||||||
|
|||||||
@@ -13,3 +13,11 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "2000:2000"
|
- "2000:2000"
|
||||||
- "8080:3000"
|
- "8080:3000"
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: "0.50"
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: "0.25"
|
||||||
|
memory: 128M
|
||||||
Reference in New Issue
Block a user