-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (40 loc) · 1.14 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
version: '2.2'
services:
nginx:
container_name: nginx
image: nginx:1.17.6-alpine
restart: always
ports:
- 80:80
- 443:443
volumes: #Overwrite nginx configuration
# 挂载配置文件
- ./nginx/sites/:/etc/nginx/conf.d/:ro
# 这里设置 宿主项目目录
- ${PROJECTPATH}:/var/www:rw
# 本地log目录映射
- ./nginx/log:/var/log/nginx
networks:
- app_net
php:
container_name: php
build:
context: ./php/php${PHP_VERSION}
args:
PHP_VERSION: ${PHP_VERSION}
SWOOLE_VERSION: ${SWOOLE_VERSION}
REDIS_VERSION: ${REDIS_VERSION}
ports:
- 9000:9000
- 9501:9501
volumes:
- ${PROJECTPATH}:/var/www:rw
# 宿主主机的git密钥目录映射至容器内以便composer操作
- /Users/kalvin/.ssh/:/root/.ssh/
tty: true
working_dir: /var/www
networks:
- app_net
networks:
app_net:
driver: bridge