-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (120 loc) · 3.23 KB
/
docker-compose.yml
File metadata and controls
126 lines (120 loc) · 3.23 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
services:
db:
image: mariadb:10.11
environment:
- MYSQL_ROOT_PASSWORD=randompassword
- MYSQL_DATABASE=ipeer
- MYSQL_USER=ipeer
- MYSQL_PASSWORD=ipeer
- MARIADB_AUTO_UPGRADE=1
volumes:
- mysqlDbData:/var/lib/mysql
ports:
- "13306:3306"
adminer:
image: adminer:latest
ports:
- 8060:8080
depends_on:
- db
app: &app
image: ubcctlt/ipeer-app
build:
context: .
volumes:
- .:/var/www/html
- appTmp:/var/www/html/app/tmp
environment:
- IPEER_DB_HOST=db
- IPEER_DB_USER=ipeer
- IPEER_DB_PASSWORD=ipeer
- IPEER_DEBUG=2
- IPEER_DEBUG_FOR_ALL_USERS=true
- IPEER_LOG_FORMAT=PrettyLog
- IPEER_SESSION_SAVE=database
# uncomment to test Caliper
# - CALIPER_HOST=https://caliper.imsglobal.org/caliper/44c6173f-907f-40c5-8c93-a1acfaa6485c/message
# - CALIPER_API_KEY=44c6173f-907f-40c5-8c93-a1acfaa6485c
# - CALIPER_BASE_URL=http://localhost.test.com/
# - CALIPER_ACTOR_BASE_URL=http://www.ubc.ca/%s
# - CALIPER_ACTOR_UNIQUE_IDENTIFIER_PARAM=username
#- IPEER_AUTH=Ldap
#- IPEER_AUTH_LDAP_host=ldap.example.com
#- IPEER_AUTH_LDAP_port=636
# uncomment or use docker-compose override to enable xdebug remote debugging
#- PHP_IDE_CONFIG=serverName=docker
#- XDEBUG_MODE=debug
#- XDEBUG_SESSION=PHPSTORM
#- XDEBUG_CONFIG=client_host=host.docker.internal client_port=9000 log=/tmp/xdebug.log
depends_on:
- db
worker: &worker
<<: *app
command: bash -c "sleep 5 && cake/console/cake worker run"
volumes: []
web:
image: nginx:1.27-alpine
volumes:
- ./app/webroot:/var/www/html
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "8080:80"
depends_on:
- app
db-test:
image: mariadb:10.11
environment:
- MYSQL_ROOT_PASSWORD=randompassword
- MYSQL_DATABASE=ipeer_test
- MYSQL_USER=ipeer
- MYSQL_PASSWORD=ipeer
- MARIADB_AUTO_UPGRADE=1
profiles: [ "test" ]
networks: [ "test" ]
app-test:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/var/www/html
environment:
- IPEER_DB_HOST=db-test
- IPEER_DB_USER=ipeer
- IPEER_DB_PASSWORD=ipeer
- IPEER_DB_NAME=ipeer_test
- IPEER_DEBUG=2
- IPEER_LOG_FORMAT=PrettyLog
- IPEER_SESSION_SAVE=database
- SELENIUM_HOST=selenium-local
- SELENIUM_BROWSER=chrome
#- SELENIUM_BROWSER=firefox
- SERVER_TEST=http://web-test
#- IPEER_AUTH=Ldap
#- IPEER_AUTH_LDAP_host=ldap.example.com
#- IPEER_AUTH_LDAP_port=636
depends_on:
- db-test
healthcheck:
test: ["CMD-SHELL", "php -r \"exit(@fsockopen('localhost', 9000) ? 0 : 1);\""]
interval: 2s
timeout: 2s
retries: 3
profiles: [ "test" ]
networks: [ "test" ]
web-test:
image: nginx:1.19-alpine
volumes:
- ./app/webroot:/var/www/html
- ./docker/nginx-unittest.conf:/etc/nginx/conf.d/default.conf
ports:
- "8081:80"
depends_on:
app-test:
condition: service_healthy
profiles: [ "test" ]
networks: [ "test" ]
networks:
test:
volumes:
mysqlDbData:
appTmp: