Include `-m` flag in `docker run` call to limit memory per container
As per Docker run documentation (https://docs.docker.com/config/containers/resource_constraints/#limit-a-containers-access-to-memory), the `-m` flag must be set in order for `--oom-kill-disable` to have the intended effect. Otherwise, an exhaustion of memory in the container will put pressure on the host's processes. This commit sets the max memory to 200MB assuming the t3.small instance has 2GB total.
This commit is contained in:
		
							parent
							
								
									886579669e
								
							
						
					
					
						commit
						956624c10d
					
				| 
						 | 
					@ -349,6 +349,7 @@ func (sv *supervisor) reload() error {
 | 
				
			||||||
		"-p", fmt.Sprintf("127.0.0.1:%d:6119", port),
 | 
							"-p", fmt.Sprintf("127.0.0.1:%d:6119", port),
 | 
				
			||||||
		"-e", "FATHOM_SITE_ID",
 | 
							"-e", "FATHOM_SITE_ID",
 | 
				
			||||||
		"-e", "RIJU_DEPLOY_CONFIG",
 | 
							"-e", "RIJU_DEPLOY_CONFIG",
 | 
				
			||||||
 | 
							"-m", "200m",
 | 
				
			||||||
		"--label", fmt.Sprintf("riju.deploy-config-hash=%s", deployCfgHash),
 | 
							"--label", fmt.Sprintf("riju.deploy-config-hash=%s", deployCfgHash),
 | 
				
			||||||
		"--name", name,
 | 
							"--name", name,
 | 
				
			||||||
		"--restart", "unless-stopped",
 | 
							"--restart", "unless-stopped",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue