-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
115 lines (115 loc) · 3.34 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
version: '3'
#COMPOSE_CONVERT_WINDOWS_PATHS
services:
nginx:
image: nginx:1.14.2
container_name: "my-nginx"
depends_on:
- laravel
volumes:
- /dockershare/data/logs/nginx:/var/log/nginx
- /dockershare/lnmp-config/nginx/nginx.conf:/etc/nginx/nginx.conf
- /dockershare/lnmp-config/nginx/sites:/etc/nginx/conf.d
- /dockershare/app:/data/app
ports:
- 80:80
networks:
- lnmp
# php:
# #image: cat2xyj/mini_php
# build: ./miniphp
# container_name: "my-php"
# volumes:
# - /dockershare/lnmp-config/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
# - /dockershare/lnmp-config/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
# - /dockershare/lnmp-config/php/php.ini:/usr/local/etc/php/php.ini
# - /dockershare/app:/data/app
# ports:
# - 9000:9000
# networks:
# - lnmp
laravel:
build: ./laravel
container_name: "my-laravel"
volumes:
- /dockershare/lnmp-config/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
- /dockershare/lnmp-config/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
- /dockershare/lnmp-config/php/php.ini:/usr/local/etc/php/php.ini
- /dockershare/app:/data/app
ports:
- 9000:9000
networks:
- lnmp
node:
build: ./node
# image: node:latest
container_name: "my-node"
networks:
- lnmp
volumes:
- /dockershare/app/node:/data/app/node
ports:
- "3000:3000"
redis:
build: ./redis
container_name: "my-redis"
networks:
- lnmp
volumes:
- /dockershare/data/storage/redis:/data/storage/redis
- /dockershare/data/logs/redis:/var/log
- /dockershare/lnmp-config/redis/redis.conf:/usr/local/etc/redis/redis.conf
ports:
- "6379:6379"
es:
image: elasticsearch:7.9.0
container_name: "my-es"
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- /dockershare/lnmp-config/es/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- /dockershare/data/storage/es:/usr/share/elasticsearch/data
- /dockershare/lnmp-config/es-plugins:/usr/share/elasticsearch/plugins
ports:
- 9200:9200
- 9300:9300
networks:
- lnmp
# tomcate:
# image: "tomcate:latest"
# container_name: "my-tomcat"
# networks:
# - lnmp
# ports:
# - 8080
# splash:
# image: "scrapinghub/splash"
# container_name: "my-splash"
# networks:
# - lnmp
# ports:
# - 8050:8050
mysql_57:
#build: "./mysql57"
image: mysql:5.7
container_name: "my-mysql"
networks:
- lnmp
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: "123456"
MYSQL_USER: "docker"
MYSQL_PASSWORD: "123456"
volumes:
#以下代码在win7中会被mysql忽略配置
#- /dockershare/lnmp-config/mysql/my.cnf:/etc/mysql/my.cnf
#- /dockershare/data/storage/mysql57:/var/lib/mysql
#挂载到VM中 但是重启机器会消失,所以最好手动备份数据 到 /dockershare/data/storage/mysql57
#备份 sudo cp -Rp /data/storage/mysql57/* /dockershare/data/storage/mysql57
#还原 sudo mkdir -p /data/storage/mysql57 && sudo cp -Rp /data/storage/mysql57/* /dockershare/data/storage/mysql57
- /mysql/data:/var/lib/mysql
- /dockershare/data/logs/mysql57:/var/log/mysql
networks:
lnmp: