-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
47 lines (42 loc) · 887 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
36
37
38
39
40
41
42
43
44
45
46
47
version: '2.1'
volumes:
mysql:
driver: local
services:
php:
image: php:7.2-fpm-composer-pdo-mysql-zip-xml-intl
build:
context: docker
dockerfile: PHPDockerfile
restart: always
volumes:
- .:/var/www/html
depends_on:
mysql:
condition: service_healthy
env_file:
- .env
mysql:
image: mysql:5.7
restart: always
env_file:
- .env
volumes:
- mysql:/var/lib/mysql
ports:
- ${MYSQL_PORT}:3306
healthcheck:
test: 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD --execute "SHOW DATABASES;"'
interval: 2s
timeout: 3s
retries: 15
nginx:
image: nginx:stable-alpine
restart: always
volumes:
- ./public:/usr/share/nginx/html/
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php
ports:
- ${HTTP_PORT}:80