zoukankan      html  css  js  c++  java
  • vue在Docker上运行

    Dockerfile
    # 设置基础镜像 
    FROM nginx:latest
    # 定义作者
    MAINTAINER test
    # 将dist文件中的内容复制到 /etc/nginx/html/ 这个目录下面
    COPY dist/  /etc/nginx/html/
    # 将配置文件中的内容复制到 /etc/nginx 这个目录下面(增加自己的代理及一些配置)
    RUN rm -rf /etc/nginx/nginx.conf 
    COPY nginx.conf /etc/nginx/nginx.conf
    

      

    nginx.conf
    user  nginx;
    worker_processes  auto;
     
    error_log  /var/log/nginx/error.log warn;
    pid        /var/run/nginx.pid;
     
     
    events {
        worker_connections  1024;
    }
     
     
    http {
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;
     
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';
     
        access_log  /var/log/nginx/access.log  main;
     
        sendfile        on;
        #tcp_nopush     on;
     
        keepalive_timeout  65;
     
        #gzip  on;
     
    	server {
    		listen       80;
    		listen  [::]:80;
    		server_name  localhost;
    		location / {
    			root   /etc/nginx/html;
    			index  index.html index.htm;
    		}
    		location = /50x.html {
    			root   /usr/share/nginx/html;
    		}
    		
    	}
    }
    

      

    全自动发布:

    相信自己,一切皆有可能!
  • 相关阅读:
    构造器
    方法
    Arrays常用的类
    栈内存和堆内存
    方法的重载
    数组遍历
    Scanner类
    连接符和三元运算符
    逻辑运算和位运算
    CSAPP笔记(第二章 信息的表示和处理)-02
  • 原文地址:https://www.cnblogs.com/zhaocici/p/14911711.html
Copyright © 2011-2022 走看看