-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
70 lines (66 loc) · 2.18 KB
/
Copy pathdocker-compose.e2e.yml
File metadata and controls
70 lines (66 loc) · 2.18 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
# Disposable Dolibarr 23.0.3 for the end-to-end canary. Everything here is throwaway:
# ephemeral named volumes (removed by `docker compose down -v`), test-only credentials,
# and a loopback-only high port. NEVER point these tests at a real instance — the e2e
# canary writes (create/update/delete thirdparties). Driven by `mise run e2e`.
#
# MariaDB (not PostgreSQL) on purpose: the official dolibarr/dolibarr image only
# auto-installs the schema on MySQL/MariaDB (its entrypoint gates DB init on
# DB_TYPE != pgsql). The DB backend is irrelevant to what the canary checks — the
# low-level REST transport against a live API — so we take the image's supported,
# deterministic auto-install path. Production stays on PostgreSQL; the read-only smoke
# test covers it.
#
# Port 7003: distinct from the dev stack (7001) and dolibarr-client's e2e stack (7002)
# so all three can run locally at once.
name: dolibarr-api-e2e
services:
mariadb:
image: mariadb:11
environment:
MARIADB_DATABASE: dolibarr
MARIADB_USER: dolibarr
MARIADB_PASSWORD: dolibarr
MARIADB_ROOT_PASSWORD: dolibarr
volumes:
- db:/var/lib/mysql
healthcheck:
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
interval: 5s
timeout: 3s
retries: 15
networks:
- e2e
dolibarr:
image: dolibarr/dolibarr:23.0.3
environment:
DOLI_DB_TYPE: mysqli
DOLI_DB_HOST: mariadb
DOLI_DB_HOST_PORT: 3306
DOLI_DB_NAME: dolibarr
DOLI_DB_USER: dolibarr
DOLI_DB_PASSWORD: dolibarr
# Auto-install so the REST API answers without the web wizard.
DOLI_INSTALL_AUTO: 1
DOLI_ADMIN_LOGIN: admin
DOLI_ADMIN_PASSWORD: e2e-admin-pass
DOLI_URL_ROOT: 'http://localhost:7003'
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
ports:
- '127.0.0.1:7003:80'
depends_on:
mariadb:
condition: service_healthy
volumes:
- documents:/var/www/documents
healthcheck:
test: ['CMD', 'curl', '--silent', '--show-error', '--fail', '--max-time', '3', 'http://0.0.0.0']
interval: 10s
timeout: 5s
retries: 30
networks:
- e2e
volumes:
db:
documents:
networks:
e2e: