-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
131 lines (131 loc) · 3.55 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: '3.2'
services:
database:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_database
tty: true
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci','--default-authentication-plugin=mysql_native_password']
build:
context: ./.docker/images/mysql
args:
- DATABASE_IMAGE=${DATABASE_IMAGE}
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_INITDB_SKIP_TZINFO: 1
expose:
- "3306"
ports:
- ${MYSQL_PORT}:3306
volumes:
- sql-data:/var/lib/mysql
depends_on:
- nginx
phpmyadmin:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_phpmyadmin
build:
context: ./.docker/images/phpmyadmin
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- PMA_HOST=database
- PMA_PORT=3306
- PMA_USER=${MYSQL_USER}
- PMA_PASSWORD=${MYSQL_PASSWORD}
ports:
- ${PHPMYADMIN_PORT}:80
depends_on:
- database
mongodb:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_mongodb
build:
context: ./.docker/images/mongodb
args:
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_ROOT_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_ROOT_PASSWORD}
- MONGODB_DATABASE=${MONGODB_DATABASE}
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_ROOT_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_ROOT_PASSWORD}
- MONGODB_DATABASE=${MONGODB_DATABASE}
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}
ports:
- 27017:27017
volumes:
- mongodb-data:/data/db
nginx:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_nginx
working_dir: /var/www/
build:
context: ./.docker/images/nginx
args:
- APP_HOST=${APP_HOST}
- NGINX_ENABLE_HTTPS=${NGINX_ENABLE_HTTPS}
volumes:
- ${APP_SRC}:/var/www/:cached
- ./.docker/images/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./.docker/images/nginx/conf.d/:/etc/nginx/conf.d
ports:
- ${NGINX_PORT_80}:80
- ${NGINX_PORT_443}:443
depends_on:
- php-fpm
php-fpm:
user: www
container_name: ${CONTAINER_PREFIX}_php-fpm
working_dir: /var/www/
expose:
- 9000
build:
context: ./.docker/images/php-fpm
args:
- PHP_VERSION=${PHP_VERSION}
- ENABLE_XDEBUG=${ENABLE_XDEBUG}
volumes:
- ${APP_SRC}:/var/www/:cached
redis:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_redis
build:
context: ./.docker/images/redis
expose:
- 6379
ports:
- 6379:6379
mailhog:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_mailhog
build:
context: ./.docker/images/mailhog
expose:
- "1025"
ports:
- ${MAILHOG_PORT}:8025
echo-server:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_echo-server
build:
context: ./.docker/images/echo-server
ports:
- 6001
volumes:
- ./.docker/images/echo-server/laravel-echo-server.json:/opt/laravellaravel-echo-server.json:ro
depends_on:
- redis
node:
working_dir: /var/www/
container_name: ${CONTAINER_PREFIX}_node
build:
context: ./.docker/images/node
volumes:
- ${APP_SRC}:/var/www:cached
volumes:
sql-data:
mongodb-data: