-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
43 lines (43 loc) · 1.23 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
version: "3"
services:
nginx:
image: nginx:1.12.1-alpine
ports:
- "80:80"
links:
- php
- node
volumes:
- ./wwwroot:/home/www-data #如果不加这行就会出现 -> issues/2
- ./app/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./app/nginx/vhost:/etc/nginx/conf.d
#构建本地Dockerfile
#php:
# build:
# context: ./app/php7.2
# dockerfile: Dockerfile
php:
image: registry.cn-qingdao.aliyuncs.com/majianwei/docker-lnmp:php7.2-alpine
ports:
- "2223:22"
volumes:
- ./wwwroot:/home/www-data
- ./app/php7.2/conf/php.ini-development:/usr/local/etc/php/php.ini
- ./app/ssh/user1:/root/.ssh
- ./app/ssh/www-data:/home/www-data/.ssh
node:
command: npm start
image: node:9.2-alpine
working_dir: /home/www-data
volumes:
- ./wwwroot:/home/www-data
mysql:
image: mysql:5.6
ports:
- "3306:3306"
volumes:
- ./data/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_USER: "test"
MYSQL_PASSWORD: "test123"