Skip to content

Improve docker-compose config #1674

@shaliko

Description

@shaliko

After setup bunch of servers and I have more experience with docker-compose I offer the following improvements:

  1. Create named volumes for api-umbrella image for easy find persisted data and debug. The docker volume ls show names "apinf_apiumbrella_db" and "apinf_apiumbrella_log" instead of "29a16569750dc941ecaf3b71f3811a02b97f7caec974c575aa428aaf8f4b2b2b".

  2. 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"
  1. 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.

  2. 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).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions