-
Notifications
You must be signed in to change notification settings - Fork 33
Description
After setup bunch of servers and I have more experience with docker-compose I offer the following improvements:
-
Create named volumes for api-umbrella image for easy find persisted data and debug. The
docker volume lsshow names "apinf_apiumbrella_db" and "apinf_apiumbrella_log" instead of "29a16569750dc941ecaf3b71f3811a02b97f7caec974c575aa428aaf8f4b2b2b". -
Override default command for api-umbrella image for setup missed curl utility. I found that if we will drop container (but keep data) and start docker-compose again, 'curl' will be missed. Additionally that will simplify first setup. Already tested that it works correct:
bash -c "apt-get update && apt-get install -qq -y --no-install-recommends curl && api-umbrella run"
-
Add "mem_limit" per service for more reliable distribution of resources. That not issue now, but will be good add limitations. We can assume that we have a 2G memory on the machine. As example guarantee that DB's will always have enough resource and will not have concurrency with other containers for get more memory.
-
Take out MongoDB from "api-umbrella" docker image and use the separate container with mongo DB. That will simplify work with data (keep it persisted), easy update mongo version and for feature easy setup MongoDB on separate server (AWS, Rancher, deploy to cloud scenarios).