This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
74 lines (74 loc) · 1.85 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
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
nginx:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_nginx
working_dir: /var/www/
build:
context: ./.docker/images/nginx
args:
- APP_HOST=${APP_HOST}
volumes:
- ${APP_SRC}:/var/www/
- ./.docker/images/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./.docker/images/nginx/conf.d/:/etc/nginx/conf.d
ports:
- ${NGINX_PORT_80}:80
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
volumes:
sql-data: