-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
66 lines (63 loc) · 1.6 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
version: "2"
services:
# mysql
mysql:
image: mysql:5.7.19
container_name: mysql
ports:
- 3306:3306
volumes:
- ./services/mysql/data:/var/lib/mysql
- ./services/mysql/config/mysql.conf.d/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
- ./logs/mysql:/var/log/mysql
- ./services/mysql/run/mysqld:/var/run/mysqld
restart: always
environment:
MYSQL_ROOT_PASSWORD: luvvien
MYSQL_DATABASE: luvvien
MYSQL_USER: luvvien
MYSQL_PASSWORD: luvvien
# php-fpm
php-fpm:
image: luvvien/docker-php-fpm-composer:latest
container_name: php-fpm
volumes:
- ./apps:/apps
- ./services/php/config/php.ini:/usr/local/etc/php/php.ini
- ./services/php/config/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./services/mysql/run/mysqld:/var/run/mysqld
restart: always
working_dir: /apps
# Redis
redis:
image: redis:latest
ports:
- 6379:6379
container_name: redis
# environment:
# REDIS_PASSWORD: "luvvien"
command: redis-server --requirepass luvvien
volumes:
- ./services/redis/data:/data
restart: always
# nginx
nginx:
image: pagespeed/nginx-pagespeed
container_name: nginx
ports:
- 80:80
- 443:443
links:
- mysql
- nginx
depends_on:
- php-fpm
- mysql
- redis
volumes:
- ./apps:/apps
- ./services/nginx/config/conf.d:/etc/nginx/conf.d
- ./services/nginx/config/cert:/etc/nginx/cert
- ./services/nginx/config/nginx.conf:/etc/nginx/nginx.conf
- ./logs/nginx:/var/log/nginx
restart: always