-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
88 lines (81 loc) · 2.28 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: "3.9"
services:
api:
image: ${REGISTRY:-localhost}/devhub_nginx:latest
build:
context: ./
dockerfile: .docker/develop/nginx/Dockerfile
cache_from:
- ${REGISTRY:-localhost}/devhub_nginx:latest
container_name: api
volumes:
- ./:/var/www/
ports:
- "8090:80"
depends_on:
- php
- mysql
- redis
networks:
- front_devhub
mysql:
image: ${REGISTRY:-localhost}/devhub_mysql:latest
build:
context: ./
dockerfile: .docker/develop/mysql/Dockerfile
cache_from:
- ${REGISTRY:-localhost}/devhub_mysql:latest
container_name: mysql
restart: unless-stopped
tty: true
ports:
- '${FORWARD_DB_PORT:-4306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_DATABASE: '${DB_DATABASE:-devhub}'
MYSQL_USER: '${DB_USERNAME:-root}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- mysql:/var/lib/mysql
networks:
- front_devhub
redis:
container_name: redis
image: redis:6.2-alpine
ports:
- "6379:6379"
networks:
- front_devhub
mailhog:
image: mailhog/mailhog:latest
container_name: mailhog
ports:
- "1025:1025"
- "8025:8025"
networks:
- front_devhub
php:
image: ${REGISTRY:-localhost}/devhub:latest
build:
context: ./
dockerfile: .docker/develop/php/Dockerfile
cache_from:
- ${REGISTRY:-localhost}/devhub:latest
container_name: php
environment:
PHP_IDE_CONFIG: 'serverName=docker'
volumes:
- ./:/var/www/
# - ./.docker/develop/php/local.ini:/usr/local/etc/php/conf.d
- ./.docker/develop/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
ports:
- "9000:9000"
networks:
- front_devhub
networks:
front_devhub:
driver: bridge
volumes:
mysql:
driver: local