-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (35 loc) · 867 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (35 loc) · 867 Bytes
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
version: '3.9'
services:
php-app:
build:
context: .
dockerfile: docker/Dockerfile
volumes:
- ./src:/var/www/html
- ./vendor:/var/www/vendor
- ./resources:/var/www/resources
# Exclude vendor folder from host
#- /var/www/vendor
ports:
- "8080:80"
extra_hosts:
- "host.docker.internal:host-gateway"
command: >
sh -c "docker-php-entrypoint apache2-foreground"
test:
build:
context: .
dockerfile: docker/Dockerfile
volumes:
- ./src:/var/www/html
- ./tests:/var/www/tests
- ./vendor:/var/www/vendor
- ./resources:/var/www/resources
working_dir: /var/www
command: vendor/bin/phpunit --colors=always tests
environment:
APP_ENV: testing
depends_on:
- php-app
extra_hosts:
- "host.docker.internal:host-gateway"