-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (40 loc) · 1.1 KB
/
docker-compose.yml
File metadata and controls
40 lines (40 loc) · 1.1 KB
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
services:
web:
image: nginx:${NGINX_VERSION}-alpine
volumes:
- "./src:/var/www/html"
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/nginx/nginx.conf:/etc/nginx/nginx.conf"
ports:
- "8081:80"
environment:
- NGINX_HOST=${NGINX_HOST}
restart: always
depends_on:
- php
- mysql
php:
build:
context: .
dockerfile: docker/php/Dockerfile
args:
php_version: ${PHP_VERSION}
restart: always
volumes:
- "./src:/var/www/html"
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- "./etc/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini"
- "./etc/php-fpm/www.conf:/usr/local/etc/php-fpm.d/www.conf"
mysql:
image: mysql:${MYSQL_VERSION}
container_name: ${MYSQL_HOST}
restart: always
volumes:
- "./docker/mysql/:/docker-entrypoint-initdb.d/"
env_file:
- ".env"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}