-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
45 lines (39 loc) · 1.08 KB
/
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
36
37
38
39
40
41
42
43
44
45
name: lara-asp
x-project: &project
init: true
build: .
volumes:
- ./:/project
working_dir: /project
environment:
LANG: C.utf8
services:
app:
<<: *project
depends_on:
setup:
condition: service_completed_successfully
command: |
php -S localhost:8000 -t ./dev/public
healthcheck:
test: curl -f http://localhost:8000/up || exit 1
start_period: 1m
interval: 1m
timeout: 10s
retries: 3
setup:
<<: *project
command: |
sh -c '
set -eux
if test -f "./composer.json" -a ! -d "./vendor"; then
composer install
composer bin all install
fi
if test -f "./dev/composer.json" -a ! -d "./dev/vendor"; then
(cd ./dev && composer install)
fi
if test -f "./package.json" -a ! -d "./node_modules"; then
npm install
fi
'