-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
54 lines (49 loc) · 1.46 KB
/
docker-compose.dev.yml
File metadata and controls
54 lines (49 loc) · 1.46 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
services:
#nginx
web:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
#php
app:
build:
dockerfile: ./php/Dockerfile
target: app_dev
volumes:
#- /var/www/html/vendor
- ./app:/var/www/html
- ./php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro
environment:
MYSQL_HOST: db
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
REDIS_HOST: cache
REDIS_PORT: ${REDIS_PORT}
# See https://xdebug.org/docs/all_settings#mode
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
extra_hosts:
# Ensure that host.docker.internal is correctly defined on Linux
- host.docker.internal:host-gateway
#mysql
db:
image: mysql:8.0
volumes:
- mysqldata:/var/lib/mysql
ports:
- "3306:3306"
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
#redis
cache:
image: redis:latest
volumes:
mysqldata: