-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (35 loc) · 951 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
version: '3'
services:
mysql:
build:
context: ./docker/mysql
args:
mysql_version: ${MYSQL_VERSION}
container_name: ${COMPOSE_PROJECT_NAME}-mysql
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "3306:3306"
volumes:
- ./db:/var/lib/mysql
- ./logs/mysql:/var/log
restart: always
php:
build:
context: ./docker/php
args:
php_version: ${PHP_VERSION}
container_name: ${COMPOSE_PROJECT_NAME}-php
ports:
- "${PHP_PORT}:80"
volumes:
- ./www:/var/www/html
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./logs/php-error.log:/var/log/apache2/error.log
- ./logs/php-access.log:/var/log/apache2/access.log
links:
- mysql