Skip to content

Commit

Permalink
Merge branch 'master' into adapt_raft_to_more_platform
Browse files Browse the repository at this point in the history
  • Loading branch information
mervinkid authored Mar 4, 2020
2 parents 7fd7f4d + 8fe4cd8 commit e8d645e
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 1 deletion.
47 changes: 47 additions & 0 deletions docker/conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
events {
worker_connections 1024;
}

http {

upstream masters {
server 192.168.0.11:17010;
server 192.168.0.12:17010;
server 192.168.0.13:17010;
}

upstream objectnodes {
server 192.168.0.41:80;
server 192.168.0.42:80;
}

server {
listen 80;
server_name object.chubao.io ~^(?<bucket>.+)\.object\.chubao\.io$;
charset utf-8;

location / {
proxy_pass http://objectnodes;

proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

server {
listen 80;
server_name master.chubao.io;
charset utf-8;

location / {
proxy_pass http://masters;

proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}
2 changes: 1 addition & 1 deletion docker/conf/objectnode.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"192.168.0.13:17010"
],
"domains": [
"object.chubaofs.io"
"object.chubao.io"
]
}
31 changes: 31 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ services:
- datanode3
- datanode4
- objectnode1
- objectnode2
- nginx
networks:
extnetwork:

Expand Down Expand Up @@ -262,6 +264,22 @@ services:
extnetwork:
ipv4_address: 192.168.0.41

objectnode2:
image: chubaofs/cfs-base:1.0
ports:
- "80"
volumes:
- ./bin:/cfs/bin
- ./conf/objectnode.json:/cfs/conf/objectnode.json
- ./script/start_objectnode.sh:/cfs/script/start.sh
command: /bin/sh /cfs/script/start.sh
restart: on-failure
privileged: true
networks:
extnetwork:
ipv4_address: 192.168.0.42


client:
image: chubaofs/cfs-base:1.0
ports:
Expand Down Expand Up @@ -318,6 +336,19 @@ services:
networks:
extnetwork:

nginx:
image: nginx:1.17.8
ports:
- "80:80"
volumes:
- ./conf/nginx.conf:/etc/nginx/nginx.conf:ro
command: /bin/bash -c "nginx -g 'daemon off;'"
restart: on-failure
privileged: true
networks:
extnetwork:
ipv4_address: 192.168.0.100

build:
image: chubaofs/cfs-base:1.0
volumes:
Expand Down

0 comments on commit e8d645e

Please sign in to comment.