-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
64 lines (59 loc) · 1.33 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
version: "3"
networks:
backend:
driver: bridge
services:
mysql:
image: mysql:${MYSQL_VERSION}
container_name: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ${DATA_PATH_HOST}/mysql:/var/lib/mysql
# - ./mysql/mysql.cnf:/etc/mysql/my.cnf # mysql config file
ports:
- "${MYSQL_PORT}:3306"
networks:
- backend
redis:
image: redis
container_name: reids
restart: always
volumes:
- ${DATA_PATH_HOST}/redis:/data
# - ./conf/redis/redis.conf:/etc/redis/redis.conf
ports:
- "${REDIS_PORT}:6379"
networks:
- backend
# php-fpm
php-fpm:
build:
context: ./php-fpm
args:
- PHP_VERSION=${PHP_VERSION}
container_name: php-fpm
volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:/var/www
networks:
- backend
expose:
- "9000"
nginx:
image: nginx
container_name: nginx
volumes:
- ${APP_CODE_PATH_HOST}:/var/www
- ./nginx/sites:/etc/nginx/conf.d
ports:
- "80:80"
- "443:443"
- "9100:9100"
depends_on:
- php-fpm
networks:
- backend