-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (64 loc) · 1.72 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '3'
services:
php:
build:
context: ./docker/php
dockerfile: ./Dockerfile
volumes:
- .:/var/www/html:cached
- ~/.composer/auth.json:/var/www/.composer/auth.json:cached
networks:
- app-network
tty: true
environment:
XDEBUG_CONFIG: remote_host=10.254.254.254
PHP_IDE_CONFIG: serverName=localhost
#PHP Service
php-fpm:
build:
context: ./docker/php-fpm
dockerfile: ./Dockerfile
args:
XDEBUG_ENABLE: ${XDEBUG_ENABLE}
expose:
- 9000
volumes:
- .:/var/www/html:cached
networks:
- app-network
tty: true
environment:
XDEBUG_CONFIG: remote_host=10.254.254.254
PHP_IDE_CONFIG: serverName=localhost
#Nginx Service
nginx:
image: nginx:latest
ports:
- 80:80
volumes:
- ./docker/nginx/sites/default.conf:/etc/nginx/conf.d/default.conf
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- .:/var/www/html:cached
depends_on:
- php-fpm
networks:
- app-network
#MySQL Service
mysql:
platform: linux/x86_64
image: mysql:5.7
expose:
- ${DB_PORT}
ports:
- ${DB_PORT}:${DB_PORT}
networks:
- app-network
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
#Docker Networks
networks:
app-network:
driver: bridge