-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.local.yml
49 lines (45 loc) · 1.02 KB
/
compose.local.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
services:
# nginx
web:
image: nginx:latest
ports:
- "8081:80"
volumes:
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
app:
build:
dockerfile: ./php/Dockerfile
target: "${BUILD_TARGET:-app}"
volumes:
- ./app:/srv
- ./php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
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
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: nginxphpredis
cache:
image: redis:latest
volumes:
mysqldata: ~
# php
# mysql
# redis