-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
48 lines (45 loc) · 1.03 KB
/
docker-compose.dev.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
services:
# nginx
web:
image: nginx:latest
ports:
- "8080:80"
volumes:
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
# php
app:
build:
dockerfile: ./php/Dockerfile
target: "${BUILD_TARGET:-app}"
volumes:
- ./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_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
REDIS_HOST: cache
REDIS_PORT: ${REDIS_PORT}
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
extra_hosts:
- 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: secret
MYSQL_USER: user
MYSQL_PASSWORD: secret
MYSQL_DATABASE: docker-php
# redis
cache:
image: redis:latest
volumes:
mysqldata: