forked from phpmyadmin/docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.testing-one-host.yml
69 lines (65 loc) · 1.68 KB
/
docker-compose.testing-one-host.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3.1"
services:
db_server:
image: ${DB:-mariadb:10.3}
container_name: phpmyadmin_testing_db
environment:
MYSQL_ROOT_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-uroot", "-p${TESTSUITE_PASSWORD:-my-secret-pw}"]
start_period: 5s
interval: 5s
timeout: 60s
retries: 10
networks:
testing:
volumes:
- ./testing/testing.cnf:/etc/mysql/conf.d/testing.cnf:ro
tmpfs:
- /var/lib/mysql:rw,noexec,nosuid,size=300m
phpmyadmin:
build:
context: apache
container_name: phpmyadmin_testing_apache
environment:
PMA_HOST: db_server
UPLOAD_LIMIT: 123M
MAX_EXECUTION_TIME: 125
HIDE_PHP_VERSION: 1
volumes:
- ./testing/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
healthcheck:
test: ["CMD", "curl", "-Ss", "http://localhost/robots.txt"]
start_period: 5s
interval: 3s
timeout: 60s
retries: 10
networks:
testing:
depends_on:
db_server:
condition: service_healthy
sut:
depends_on:
phpmyadmin:
condition: service_healthy
db_server:
condition: service_healthy
build:
context: testing
command: "/tests/testing/test-docker.sh"
networks:
testing:
environment:
TESTSUITE_HOSTNAME: phpmyadmin_testing_apache
TESTSUITE_PORT: 80
TESTSUITE_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
PMA_HOST: phpmyadmin_testing_db
PMA_PORT: 3306
volumes:
- ./:/tests:ro
- /var/run/docker.sock:/var/run/docker.sock
working_dir: /tests
networks:
testing:
driver: bridge