Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# NOTE!!!: Don't copy and edit this file yourself. Instead, use ./scripts/generate_env.sh to generate a new one

## DHIS2
HOSTNAME=dhis2-127-0-0-1.nip.io
LETSENCRYPT_ACME_EMAIL=<[email protected]>

DHIS2_VERSION=42

DHIS2_ADMIN_USERNAME=admin
Expand All @@ -10,18 +14,33 @@ DHIS2_ADMIN_PASSWORD=<some very secure password>
DHIS2_MONITOR_USERNAME=monitor
DHIS2_MONITOR_PASSWORD=<another very secure password>

## Database
POSTGRES_VERSION=16-master
POSTGRES_PASSWORD=<another very secure password>
POSTGRES_DB=dhis
POSTGRES_DB_USERNAME=dhis
POSTGRES_DB_PASSWORD=<another very secure password>

HOSTNAME=dhis2-127-0-0-1.nip.io
LETSENCRYPT_ACME_EMAIL=<[email protected]>

## Monitoring
GRAFANA_VERSION=10.0.0
GRAFANA_ADMIN_PASSWORD=<another very secure password>
PROMETHEUS_VERSION=v2.45.0
PROMETHEUS_RETENTION_TIME=15d
LOKI_VERSION=2.9.0
LOKI_RETENTION_PERIOD=744h

## Resource constraints
DHIS2_CPU_LIMITS=
DHIS2_MEM_LIMITS=
DHIS2_CPU_RESERVATIONS=
DHIS2_MEM_RESERVATIONS=

DB_CPU_LIMITS=
DB_MEM_LIMITS=
DB_CPU_RESERVATIONS=
DB_MEM_RESERVATIONS=

TRAEFIK_CPU_LIMITS=
TRAEFIK_MEM_LIMITS=
TRAEFIK_CPU_RESERVATIONS=
TRAEFIK_MEM_RESERVATIONS=
30 changes: 30 additions & 0 deletions overlays/resource-constraints/resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
app:
deploy:
resources:
limits:
cpus: ${DHIS2_CPU_LIMITS}
memory: ${DHIS2_MEM_LIMITS}
reservations:
cpus: ${DHIS2_CPU_RESERVATIONS}
memory: ${DHIS2_MEM_RESERVATIONS}

database:
deploy:
resources:
limits:
cpus: ${DB_CPU_LIMITS}
memory: ${DB_MEM_LIMITS}
reservations:
cpus: ${DB_CPU_RESERVATIONS}
memory: ${DB_MEM_RESERVATIONS}

traefik:
deploy:
resources:
limits:
cpus: ${TRAEFIK_CPU_LIMITS}
memory: ${TRAEFIK_MEM_LIMITS}
reservations:
cpus: ${TRAEFIK_CPU_RESERVATIONS}
memory: ${TRAEFIK_MEM_RESERVATIONS}