-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
35 lines (34 loc) · 927 Bytes
/
docker-compose.yaml
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
x-build:
&build
context: ./
args:
PHP_VERSION: ${PHP_VERSION-7.0}
COMPOSER_VERSION: ${COMPOSER_VERSION-2.2}
dockerfile: docker/Dockerfile
services:
clean:
image: registry.xaer.de/xaer/php:${PHP_VERSION-7.0}-cli
build:
<<: *build
volumes:
- ./:/src
working_dir: "/src"
command: [ "sh", "-c", "rm -rf vendor || rm phpunit_results.xml || rm phpstan.json || rm composer.lock || rm .phpunit.result.cache" ]
setup:
image: registry.xaer.de/xaer/php:${PHP_VERSION-7.0}-cli
build:
<<: *build
volumes:
- ./:/src
working_dir: "/src"
command: ["sh", "-c", "composer update --with=php:$$(php -r \"echo PHP_VERSION.PHP_EOL;\")"]
php:
image: registry.xaer.de/xaer/php:${PHP_VERSION-7.0}-cli
build:
<<: *build
depends_on:
setup:
condition: service_completed_successfully
volumes:
- ./:/src
working_dir: "/src"