-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·58 lines (56 loc) · 1.73 KB
/
docker-compose.yml
File metadata and controls
executable file
·58 lines (56 loc) · 1.73 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: '3'
services:
nginx:
container_name: nginx
image: nginx:latest
ports:
- "80:80"
volumes:
# sites folder
- ./sites:/var/www
# config folder
- ./config/nginx:/etc/nginx/conf.d
# logs folder
- ./data/logs:/var/log/nginx/
depends_on:
- php
- mysql
networks:
- app-network
php:
container_name: php
build:
context: .
dockerfile: php.dockerfile
volumes:
- ./sites:/var/www
# XDEBUG. We can config php.ini (/usr/local/etc/php/php.ini) or we can create separate file xdebug.ini and place it on "/usr/local/etc/php/conf.d/" folder
- ./config/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# Enable config for reporting about all error
- ./config/php/conf.d/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini
ports:
#for laravel. Command for start lavaver is php artisan serve --host 0.0.0.0
- 8000:8000
networks:
- app-network
mysql:
container_name: mysql
image: mariadb:latest
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
command: --innodb_use_native_aio=0
environment:
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_USER: 'tutorial'
MYSQL_PASSWORD: 'secret'
MYSQL_DATABASE: 'tutorial'
volumes:
- ./data/mysql:/var/lib/mysql
ports:
- 3306:3306
networks:
- app-network
#Docker Networks
networks:
app-network:
driver: bridge