-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
35 lines (33 loc) · 1017 Bytes
/
docker-compose.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
version: '3.9'
services:
nginx:
image: nginx:stable-alpine
restart: unless-stopped
tty: true
working_dir: /code
ports:
- "80:80"
volumes:
- ./src:/code
- ./etc/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php-fpm
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost/status/nginx"]
interval: 1m
timeout: 3s
retries: 5
php-fpm:
build: .
restart: unless-stopped
tty: true
working_dir: /code
volumes:
- ./src:/code
- ./usr/local/etc/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ./usr/shared/healthchecks/php-fpm.sh:/usr/shared/healthchecks/php-fpm.sh:ro
healthcheck:
test: ["CMD", "/usr/shared/healthchecks/php-fpm.sh"]
interval: 1m
timeout: 3s
retries: 5