-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml.example
More file actions
39 lines (39 loc) · 1.2 KB
/
docker-compose.yml.example
File metadata and controls
39 lines (39 loc) · 1.2 KB
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
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
- "443:443"
- "40819:40819"
volumes:
- /services/www:/code
- /services/nginx/conf.d:/etc/nginx/conf.d
- /services/nginx/ssl:/etc/nginx/ssl
links:
- php
php:
image: nanoninja/php-fpm #官方镜像扩展太少,安装麻烦,使用第三方的
container_name: php
volumes:
- /services/www:/code
- /services/php/conf.d:/usr/local/etc/php/conf.d
redis:
image: redis:latest
container_name: redis
ports:
- "6379:6379"
mysql:
image: mysql:5.7.26
restart: always
container_name: mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=wik#120 #root账户密码,必须
- MYSQL_USER=jiantao #创建一个非root账户
- MYSQL_PASSWORD=kn90123 #对应上边test账户的密码
volumes:
- /services/mysql/conf.d:/etc/mysql/conf.d
- /services/mysql/data:/var/lib/mysql
- /services/mysql/logs:/var/log/mysql