欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使用docker compose安裝FastDfs文件服務(wù)器的實(shí)例詳解

 更新時(shí)間:2021年10月15日 10:13:59   作者:她的開呀  
這篇文章主要介紹了使用docker compose安裝FastDfs文件服務(wù)器的實(shí)例詳解,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

docker-compose.yml

version: '2'
services:
    fastdfs-tracker:
        hostname: fastdfs-tracker
        container_name: fastdfs-tracker
        image: season/fastdfs:1.2
        network_mode: "host"
        command: tracker
        volumes:
          - ./tracker_data:/fastdfs/tracker/data
    fastdfs-storage:
        hostname: fastdfs-storage
        container_name: fastdfs-storage
        image: season/fastdfs:1.2
        network_mode: "host"
        volumes:
          - ./storage_data:/fastdfs/storage/data
          - ./store_path:/fastdfs/store_path
        environment:
          - TRACKER_SERVER=xxx.xxx.xxx.xxx:22122
        command: storage
        depends_on:
          - fastdfs-tracker
    fastdfs-nginx:
        hostname: fastdfs-nginx
        container_name: fastdfs-nginx
        image: season/fastdfs:1.2
        network_mode: "host"
        volumes:
          - ./nginx.conf:/etc/nginx/conf/nginx.conf
          - ./store_path:/fastdfs/store_path
        environment:
          - TRACKER_SERVER=xxx.xxx.xxx.xxx:22122
        command: nginx

需要注意:
network_mode 必須是host, 原因是當(dāng)上傳文件時(shí),tracker會(huì)把storage的IP和端口發(fā)給client,如果是bridge模式,則發(fā)送的是內(nèi)網(wǎng)IP,client無(wú)法訪問(wèn)到。
image采用season/fastdfs:1.2 不要用lastest, 因?yàn)閘astest不包含nginx服務(wù),其他fasdfs鏡像均沒(méi)有season的精簡(jiǎn)。

nginx.conf(用于提供http的方式下載文件)

listen 7003是ngingx服務(wù)訪問(wèn)端口,可自行切換

#user  nobody;
worker_processes  1;
 
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
 
#pid        logs/nginx.pid;
 
 
events {
    worker_connections  1024;
}
 
 
http {
    include       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  logs/access.log  main;
 
    sendfile        on;
    #tcp_nopush     on;
 
    #keepalive_timeout  0;
    keepalive_timeout  65;
 
    #gzip  on;
 
    server {
        listen       7003;
        server_name  localhost;
 
        #charset koi8-r;
 
        #access_log  logs/host.access.log  main;
 
        location /group1/M00 {
            root /fastdfs/storage/data;
            ngx_fastdfs_module;
        }
 
        #error_page  404              /404.html;
 
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
 }
}

到此這篇關(guān)于使用docker-compose安裝FastDfs文件服務(wù)器的文章就介紹到這了,更多相關(guān)docker-compose安裝FastDfs內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • centos6使用docker部署kafka項(xiàng)目的方法分析

    centos6使用docker部署kafka項(xiàng)目的方法分析

    這篇文章主要介紹了centos6使用docker部署kafka項(xiàng)目的方法,結(jié)合實(shí)例形式分析了centos6環(huán)境下使用docker部署kafka項(xiàng)目的相關(guān)命令與使用技巧,需要的朋友可以參考下
    2020-02-02
  • Docker基礎(chǔ)知識(shí)之Linux namespace圖文詳解

    Docker基礎(chǔ)知識(shí)之Linux namespace圖文詳解

    這篇文章主要給大家介紹了關(guān)于Docker基礎(chǔ)知識(shí)之Linux namespace的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧。
    2018-03-03
  • Docker下多容器搭建 lamp的詳細(xì)過(guò)程(httpd+mysql+php+redis)

    Docker下多容器搭建 lamp的詳細(xì)過(guò)程(httpd+mysql+php+redis)

    這篇文章主要介紹了Docker下多容器搭建lamp的詳細(xì)過(guò)程(httpd+mysql+php+redis),搭建拉取所需鏡像,本文給大家講解的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧
    2024-01-01
  • centos7 安裝docker步驟詳細(xì)介紹

    centos7 安裝docker步驟詳細(xì)介紹

    這篇文章主要介紹了centos7 安裝docker步驟詳細(xì)介紹的相關(guān)資料,需要的朋友可以參考下
    2017-01-01
  • 使用Portainer部署Docker容器的項(xiàng)目實(shí)踐

    使用Portainer部署Docker容器的項(xiàng)目實(shí)踐

    這篇文章主要介紹了使用Portainer部署Docker容器的項(xiàng)目實(shí)踐,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-04-04
  • Docker 阿里云鏡像倉(cāng)庫(kù)CR使用小結(jié)

    Docker 阿里云鏡像倉(cāng)庫(kù)CR使用小結(jié)

    阿里云提供了免費(fèi)的容器鏡像服務(wù),更重要的是支持公開和私有倉(cāng)庫(kù),本文主要介紹了Docker 阿里云鏡像倉(cāng)庫(kù)CR使用小結(jié),具有一定的參考價(jià)值,感興趣的可以了解一下
    2024-02-02
  • 如何刪除docker-register鏡像及none無(wú)效鏡像詳解

    如何刪除docker-register鏡像及none無(wú)效鏡像詳解

    這篇文章主要給大家介紹了關(guān)于如何刪除docker-register鏡像及none無(wú)效鏡像的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧。
    2017-09-09
  • Docker在Windows環(huán)境的搭建和使用詳解

    Docker在Windows環(huán)境的搭建和使用詳解

    這篇文章主要介紹了Docker在Windows環(huán)境的搭建和使用,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2023-03-03
  • 最新評(píng)論