-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (50 loc) · 1.27 KB
/
docker-compose.yml
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
version: '2.1'
services:
database:
container_name: dhis2-database
image: postgres:9.6-alpine
environment:
POSTGRES_USER: dhis
POSTGRES_DB: dhis
POSTGRES_PASSWORD: dhis
PG_DATA: /var/lib/postgresql/data/pgdata:z
ports:
- "5433:5432"
logging:
driver: "none"
healthcheck:
test: ["CMD-SHELL", "pg_isready -h database -p 5432 -d dhis"]
interval: 30s
timeout: 30s
retries: 5
web:
container_name: dhis2-web
image: dhis2/dhis2-web:2.27-tomcat7-jre8-latest
environment:
JAVA_OPTS: "-Xmx1024m -Xms4000m"
POSTGRES_DB: dhis
ports:
- "8085:8080"
depends_on:
database:
condition: service_healthy
logging:
driver: "none"
healthcheck:
test: "curl -f http://web:8080"
interval: 30s
retries: 5
api-tests:
container_name: dhis2-api-tests
build: .
depends_on:
web:
condition: service_healthy
volumes:
- ./reports:/usr/src/app/reports
environment:
DHIS2_BASE_URL: http://web:8080
DHIS2_API_VERSION: $DHIS2_API_VERSION
DHIS2_LOG_MODE: $DHIS2_LOG_MODE
DHIS2_GENERATE_HTML_REPORT: $DHIS2_GENERATE_HTML_REPORT
command: bash -c 'wget http://web:8080/api && npm test -- $DHIS2_FEATURE'