-
Notifications
You must be signed in to change notification settings - Fork 993
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
107 lines (103 loc) · 3.79 KB
/
Copy pathdocker-compose.e2e.yml
File metadata and controls
107 lines (103 loc) · 3.79 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
services:
db:
image: postgres:18.4-alpine
container_name: e2e-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: skdcnwauicn2ucnaecasdsajdnizucawencascdca
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./config/e2e/postgresql-init.sh:/docker-entrypoint-initdb.d/01-init.sh:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 10
ports:
- '5432:5432'
mem_limit: 768m
shm_size: 256m
tmpfs:
- /var/lib/postgresql/data
command: >
postgres
-c shared_buffers=128MB
-c work_mem=4MB
-c maintenance_work_mem=64MB
fineract:
# Pinned by digest, not by tag. `apache/fineract` publishes ~8 tags a day
# and `latest` follows them, so an unpinned tag means a local run and a CI
# run can silently exercise different backend builds — and Fineract's seed
# data is part of what we test against. A build whose GroupSummaryCounts
# stretchy report is missing its `stretchy_report_parameter` row leaves
# `${groupId}` unsubstituted, which surfaces as a 403, a failed group-view
# resolver, and a redirect to `#/` — i.e. a red group spec whose cause is
# nowhere near the spec. Pinning makes "same code, same result" true again.
#
# This is the multi-arch manifest LIST digest, so amd64 (CI) and arm64
# (Apple Silicon) each still resolve their own platform image.
# Override FINERACT_IMAGE to test against a moving tag on purpose.
image: ${FINERACT_IMAGE:-apache/fineract:7ac780192@sha256:c3722d8475e140949b6bbec505833f0b5e5a6c27f8f8bd8d2ac38ff7df20fa05}
container_name: e2e-fineract
depends_on:
db:
condition: service_healthy
env_file:
- ./config/e2e/fineract.env
environment:
JAVA_TOOL_OPTIONS: >-
-Xmx1536m -Xms512m
-XX:+UseG1GC -XX:MaxGCPauseMillis=200
-Djava.security.egd=file:/dev/./urandom
healthcheck:
test:
[
'CMD-SHELL',
'wget -qO- --no-check-certificate https://localhost:8443/fineract-provider/actuator/health || exit 1'
]
interval: 10s
timeout: 10s
retries: 60
start_period: 120s
ports:
- '8443:8443'
mem_limit: 2g
web-app:
build:
context: .
dockerfile: Dockerfile
args:
PUPPETEER_SKIP_DOWNLOAD_ARG: 'true'
container_name: e2e-web-app
depends_on:
fineract:
condition: service_healthy
environment:
# Nginx proxy target (internal docker DNS)
E2E_PROXY_TARGET: https://fineract:8443
# Angular app configuration (resolved by host browser via proxy)
FINERACT_API_URLS: ''
FINERACT_API_URL: ''
FINERACT_API_PROVIDER: /fineract-provider/api
FINERACT_API_VERSION: /v1
FINERACT_PLATFORM_TENANT_IDENTIFIER: default
MIFOS_DEFAULT_LANGUAGE: en-US
MIFOS_SUPPORTED_LANGUAGES: en-US
MIFOS_PRELOAD_CLIENTS: 'false'
MIFOS_DEFAULT_CHAR_DELIMITER: ','
NGINX_ENVSUBST_FILTER: '^(FINERACT_|MIFOS_|ENABLE_|EXTERNAL_|E2E_PROXY_TARGET)'
volumes:
- ./config/e2e/nginx-e2e.conf.template:/etc/nginx/templates/default.conf.template:ro
ports:
- '4200:80'
mem_limit: 256m
# Override CMD: Dockerfile's /bin/sh CMD causes the nginx entrypoint to
# skip template processing (it checks $1 == "nginx"). Process both
# templates explicitly. Only substitute $E2E_PROXY_TARGET in the nginx
# template so $host, $scheme, $uri etc. are left for nginx.
command: >-
/bin/sh -c "
envsubst '$$E2E_PROXY_TARGET' < /etc/nginx/templates/default.conf.template > /etc/nginx/conf.d/default.conf &&
envsubst < /usr/share/nginx/html/assets/env.template.js > /usr/share/nginx/html/assets/env.js &&
nginx -g 'daemon off;'
"