Commit d9d0073d by mxy

优化版本1

parent 0b6c1057
...@@ -22,7 +22,7 @@ nameserver 127.0.0.1 ...@@ -22,7 +22,7 @@ nameserver 127.0.0.1
``` ```
1.将自己的私钥放入本目录内,方便在 http://c9.test (账户:密码:root:root,浏览器ide)操作git 1.将自己的私钥放入本目录内,方便在 http://c9.test (账户:密码:root:root,浏览器ide)操作git
2.数据使用虚拟机内的,所以这里只启动这两个 2.数据使用虚拟机内的,所以这里只启动这两个
命令:docker-compose up -d workspace dns 命令:docker-compose up -d
3.启动gulp容器 请在当前gulp目录内执行 -p 后端口按实际需要使用 3.启动gulp容器 请在当前gulp目录内执行 -p 后端口按实际需要使用
docker run -itd -v $PWD:/gulp -p 3000:3000 --name gulp cnice/piston:1.0.0 docker run -itd -v $PWD:/gulp -p 3000:3000 --name gulp cnice/piston:1.0.0
如需使用gulp命令进入容器内:docker exec -it gulp bash 如需使用gulp命令进入容器内:docker exec -it gulp bash
......
...@@ -20,3 +20,52 @@ server { ...@@ -20,3 +20,52 @@ server {
proxy_pass http://dealer.test; proxy_pass http://dealer.test;
} }
} }
server {
listen 80;
server_name piston.test;
location / {
proxy_pass http://localhost:3000/;
}
}
server {
listen 80;
server_name piston.build.test;
root /workspace/gulp/piston/dist;
index index.html index.htm index.php;
charset utf-8;
client_max_body_size 20m;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /console {
proxy_pass http://sosocar.test;
proxy_set_header Host sosocar.test;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/piston.topka.dev-error.log error;
error_page 404 /index.php;
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment