docker-compose.ymlversion: '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
nginx.conf (used to provide http download files)
#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; } } } This is the end of this article about installing FastDfs file server with docker-compose. For more information about installing FastDfs with docker-compose, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Vue close browser logout implementation example
>>: Use @font-face to implement special characters on web pages (create custom fonts)
This article uses examples to illustrate the func...
CSS3 can create animations, which can replace man...
The background color of the table can be set thro...
Table of contents 1. Download nodejs 2. Double-cl...
Table of contents 1. What is currying 2. Uses of ...
Perhaps when I name this article like this, someon...
It is common to view code effects in different br...
This article shares the specific code of JS to ac...
Preface In general development, images are upload...
<br />Not long ago, due to business needs, I...
Table of contents 1. Home Page Production 1. Prod...
The SQL query statement execution order is as fol...
Preface This article uses pdo's preprocessing...
Normally, when a deadlock occurs, the connection ...
Recently, when working on mobile pages, inline-bl...