Skip to content

Commit

Permalink
Fix #50 resource limit cpu/memory/filehandles/network
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Oct 6, 2024
1 parent 4e0ca7e commit b0d7387
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dokku-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@
subprocess.run(f"dokku resource:limit --cpu 1.5 {APP_NAME}", shell=True)

print(f"🧠 Limiting app memory resources for app: {APP_NAME}")
subprocess.run(f"dokku resource:limit --memory 500m {APP_NAME}", shell=True)
subprocess.run(f"dokku resource:limit --memory 500m --cpu 0.25 --network-ingress 50m --network-egress 50m {APP_NAME}", shell=True)

subprocess.run(f"dokku docker-options:add {APP_NAME} deploy '--ulimit nofile=200'", shell=True)
subprocess.run(f'dokku docker-options:add {APP_NAME} deploy --cpus="0.25"', shell=True)
subprocess.run(f'dokku docker-options:add {APP_NAME} deploy "--memory=200m --memory-swappiness=200m"', shell=True)


try:
Expand Down

0 comments on commit b0d7387

Please sign in to comment.