1.vue_fecshop_appserver 部分没有使用docker,需要自己搭建。
原理商,目录随便放,nginx容器做指向即可,但是,按照fecshop docker里面默认的配置,参看第2条
2.在nginx容器可以看到:
https://github.com/fecshop/yii2_fecshop_docker/blob/master/services/web/nginx/conf/conf.d/default.conf
# VUE
server {
listen 80;
server_name vue.fecshop.com;
root /www/web/vue_fecshop_appserver/dist ;
server_tokens off;
include none.conf;
index index.php index.html index.htm;
access_log /www/web_logs/access.log wwwlogs;
error_log /www/web_logs/error.log notice;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 30d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
}
nginx容器构建配置文件:https://github.com/fecshop/yii2_fecshop_docker/blob/master/docker-compose.yml#L9
,可以看到,将宿主主机的文件挂载到了nginx容器中
volumes:
./app:/www/web
那么你把文件复制到宿主主机的./app
就相当于nginx容器里面的/www/web
。
因此,按照默认的nginx配置,vue_fecshop_appserver 下载到宿主主机/www/web/yii2_fecshop_docker/app
,
下载后,在/www/web/yii2_fecshop_docker/app/vue_fecshop_appserver
中执行npm run build