-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (87 loc) · 2.04 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
version: "3"
services:
ubuntu:
image: fuke0501/ubuntu
build: ./images/ubuntu/
container_name: ubuntu
web:
image: fuke0501/nginx
build: ./images/nginx/
container_name: web_nginx
depends_on:
- ubuntu
- php-fpm
volumes:
- ./src:/src
- ./images/nginx/logs:/var/log/nginx
- ./images/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- ./images/nginx/conf/conf.d:/etc/nginx/conf.d
ports:
- "80:80"
- "443:443"
restart: always
networks:
vpcbr:
ipv4_address: 192.168.20.2
php-fpm:
image: fuke0501/php-fpm
build: ./images/php/
container_name: web_php
depends_on:
- ubuntu
volumes:
- ./src:/src
- ./images/php/conf/php.ini:/etc/php/7.2/fpm/php.ini
- ./images/php/conf/www.conf:/etc/php/7.2/fpm/pool.d/www.conf
ports:
- "9000:9000"
restart: always
links:
- mysql_db
- redis-server
networks:
vpcbr:
ipv4_address: 192.168.20.3
mysql_db:
image: fuke0501/mysql5.7
build: ./images/mysql/
container_name: web_mysql
volumes:
- ./images/mysql/data:/var/lib/mysql
- ./images/mysql/conf/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
- ./images/mysql/conf/mysql.cnf:/etc/mysql/conf.d/mysql.cnf
ports:
- "3306:3306"
restart: always
depends_on:
- ubuntu
environment:
- MYSQL_DATABASE=test
- MYSQL_ROOT_PASSWORD=laravel@2018
- MYSQL_USER=phper
- MYSQL_PASSWORD=2018@laravel
networks:
vpcbr:
ipv4_address: 192.168.20.4
redis-server:
image: fuke0501/redis
build: ./images/redis
container_name: web_redis
volumes:
- ./images/redis/data:/data
- ./images/redis/conf/redis.conf:/etc/redis/redis.conf
- ./images/redis/log:/var/log/redis
ports:
- "6379:6379"
restart: always
depends_on:
- ubuntu
networks:
vpcbr:
ipv4_address: 192.168.20.5
networks:
vpcbr:
driver: bridge
ipam:
config:
- subnet: 192.168.20.0/24