Skip to content

Commit

Permalink
OIS-52: Added example resource limits for docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
pwargulak committed Oct 18, 2024
1 parent ae66077 commit 49b0afd
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ services:
image: openlmis/reference-ui:${OL_REFERENCE_UI_VERSION}
env_file: settings.env
depends_on: [consul]
mem_limit: '1.3G'
cpus: 2

requisition:
image: openlmis/requisition:${OL_REQUISITION_VERSION}
Expand All @@ -36,6 +38,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '1.3G'
cpus: 2

referencedata:
image: openlmis/referencedata:${OL_REFERENCEDATA_VERSION}
Expand All @@ -46,6 +50,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '1.3G'
cpus: 2

auth:
image: openlmis/auth:${OL_AUTH_VERSION}
Expand All @@ -56,6 +62,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '0.7G'
cpus: 2

notification:
image: openlmis/notification:${OL_NOTIFICATION_VERSION}
Expand All @@ -66,6 +74,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '0.7G'
cpus: 2

fulfillment:
image: openlmis/fulfillment:${OL_FULFILLMENT_VERSION}
Expand All @@ -76,6 +86,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '0.7G'
cpus: 2

cce:
image: openlmis/cce:${OL_CCE_VERSION}
Expand All @@ -86,6 +98,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '0.7G'
cpus: 2

stockmanagement:
image: openlmis/stockmanagement:${OL_STOCKMANAGEMENT_VERSION}
Expand All @@ -96,6 +110,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '0.7G'
cpus: 2

report:
image: openlmis/report:${OL_REPORT_VERSION}
Expand All @@ -106,6 +122,8 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]
mem_limit: '0.7G'
cpus: 2

buq:
image: openlmis/buq:${OL_BUQ_VERSION}
Expand All @@ -116,6 +134,8 @@ services:
- 'service-config:/config'
depends_on: [ log, db ]
command: [ "/wait-for-postgres.sh", "/run.sh" ]
mem_limit: '1.3G'
cpus: 2

hapifhir:
restart: always
Expand All @@ -128,7 +148,9 @@ services:
- 'service-config:/config'
depends_on: [log, db]
command: ["/wait-for-postgres.sh", "/run.sh"]

mem_limit: '0.7G'
cpus: 2

diagnostics:
image: openlmis/diagnostics:${OL_DIAGNOSTICS_VERSION}
env_file: settings.env
Expand All @@ -138,6 +160,8 @@ services:
volumes:
- 'service-config:/config'
depends_on: [log]
mem_limit: '0.7G'
cpus: 2

dhis2-integration:
image: openlmis/dhis2-integration:${OL_DHIS2_INTEGRATION}
Expand All @@ -148,15 +172,20 @@ services:
volumes:
- 'service-config:/config'
depends_on: [log]
mem_limit: '0.7G'
cpus: 2

db:
image: openlmis/postgres:${OL_POSTGRES_VERSION}
command: postgres -c 'max_connections=1000'
env_file: settings.env
networks:
default:
aliases:
- olmis-db
depends_on: [consul]
mem_limit: '1.3G'
cpus: 4

log:
image: openlmis/rsyslog:${OL_RSYSLOG_VERSION}
Expand Down

0 comments on commit 49b0afd

Please sign in to comment.