forked from openmrs/openmrs-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.o3.yml
More file actions
81 lines (75 loc) · 2.93 KB
/
Copy pathdocker-compose.o3.yml
File metadata and controls
81 lines (75 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Modern OpenMRS 3 (O3) Reference Application — full, self-contained stack.
#
# This is the official O3 reference-application topology (gateway + frontend +
# full distro backend + db). It runs ALONGSIDE the openmrs-core stack: its own
# compose project, network, volumes, and database — nothing is shared with the
# core `api`/`db` services.
#
# The backend here is the reference-application-3-backend distro (FHIR2,
# webservices.rest, ESM backend deps, etc.), NOT openmrs-core.
#
# Usage:
# docker compose -f docker-compose.o3.yml up -d
# Open: http://localhost:8090/openmrs/spa/ (login: admin / Admin123)
# Stop: docker compose -f docker-compose.o3.yml down (add -v to wipe data)
name: openmrs-o3
services:
gateway:
image: openmrs/openmrs-reference-application-3-gateway:${O3_TAG:-demo}
restart: "unless-stopped"
depends_on:
- frontend
- backend
ports:
- "8090:80"
frontend:
image: openmrs/openmrs-reference-application-3-frontend:${O3_TAG:-demo}
restart: "unless-stopped"
environment:
SPA_PATH: /openmrs/spa
API_URL: /openmrs
SPA_CONFIG_URLS: /openmrs/spa/config-core_demo.json
SPA_DEFAULT_LOCALE:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
timeout: 5s
depends_on:
- backend
backend:
image: openmrs/openmrs-reference-application-3-backend:${O3_BACKEND_TAG:-demo}
restart: "unless-stopped"
depends_on:
- db
environment:
OMRS_CONFIG_MODULE_WEB_ADMIN: "true"
OMRS_CONFIG_AUTO_UPDATE_DATABASE: "true"
OMRS_CONFIG_CREATE_TABLES: "true"
OMRS_CONFIG_CONNECTION_SERVER: db
OMRS_CONFIG_CONNECTION_DATABASE: openmrs
OMRS_CONFIG_CONNECTION_USERNAME: ${OMRS_DB_USER:-openmrs}
OMRS_CONFIG_CONNECTION_PASSWORD: ${OMRS_DB_PASSWORD:-openmrs}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/openmrs"]
timeout: 5s
volumes:
- openmrs-data:/openmrs/data
- ./o3-empty-config:/openmrs/distribution/openmrs_config:ro
db:
image: mariadb:10.11.7
restart: "unless-stopped"
command: "mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci"
healthcheck:
test: "mariadb --user=${OMRS_DB_USER:-openmrs} --password=${OMRS_DB_PASSWORD:-openmrs} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
environment:
MYSQL_DATABASE: openmrs
MYSQL_USER: ${OMRS_DB_USER:-openmrs}
MYSQL_PASSWORD: ${OMRS_DB_PASSWORD:-openmrs}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-openmrs}
volumes:
- db-data:/var/lib/mysql
volumes:
openmrs-data:
db-data: