mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix indentation for docker compose code blocks
parent
5431c0f876
commit
e6679befc3
|
@ -25,13 +25,13 @@ RUN mv weed /usr/bin/
|
|||
```yml
|
||||
version: '3.7'
|
||||
services:
|
||||
master:
|
||||
build: .
|
||||
volumes:
|
||||
- /data/seaweedfs/master:/data/seaweedfs/master
|
||||
ports:
|
||||
- 19333:19333
|
||||
entrypoint: weed master -mdir='/data/seaweedfs/master' -ip=<public ip of server> -volumeSizeLimitMB=100000 -defaultReplication=010
|
||||
master:
|
||||
build: .
|
||||
volumes:
|
||||
- /data/seaweedfs/master:/data/seaweedfs/master
|
||||
ports:
|
||||
- 19333:19333
|
||||
entrypoint: weed master -mdir='/data/seaweedfs/master' -ip=<public ip of server> -volumeSizeLimitMB=100000 -defaultReplication=010
|
||||
```
|
||||
|
||||
3. `docker-compose up` and see if it looks ok
|
||||
|
@ -41,14 +41,14 @@ services:
|
|||
```yml
|
||||
version: '3.7'
|
||||
services:
|
||||
volume-sda:
|
||||
build: .
|
||||
volumes:
|
||||
- /data/seaweedfs/volume:/data/seaweedfs/volume
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 18080:18080
|
||||
command: weed volume -mserver=<public IP of server 1>:9333 -dir=/data/seaweedfs/volume -ip=<public ip of this server (server2)>
|
||||
volume-sda:
|
||||
build: .
|
||||
volumes:
|
||||
- /data/seaweedfs/volume:/data/seaweedfs/volume
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 18080:18080
|
||||
command: weed volume -mserver=<public IP of server 1>:9333 -dir=/data/seaweedfs/volume -ip=<public ip of this server (server2)>
|
||||
```
|
||||
|
||||
5. `docker-compose up` on both servers and check that the master sees the volume
|
||||
|
@ -56,15 +56,15 @@ services:
|
|||
```yml
|
||||
version: '3.7'
|
||||
services:
|
||||
master:
|
||||
build: .
|
||||
volumes:
|
||||
- /data/seaweedfs/master:/data/seaweedfs/master
|
||||
- ./security.toml:/etc/seaweedfs/security.toml
|
||||
- ./certs:/etc/seaweedfs/certs
|
||||
ports:
|
||||
- 19333:19333
|
||||
entrypoint: weed master -mdir='/data/seaweedfs/master' -ip=<public ip of server> -volumeSizeLimitMB=100000 -defaultReplication=010
|
||||
master:
|
||||
build: .
|
||||
volumes:
|
||||
- /data/seaweedfs/master:/data/seaweedfs/master
|
||||
- ./security.toml:/etc/seaweedfs/security.toml
|
||||
- ./certs:/etc/seaweedfs/certs
|
||||
ports:
|
||||
- 19333:19333
|
||||
entrypoint: weed master -mdir='/data/seaweedfs/master' -ip=<public ip of server> -volumeSizeLimitMB=100000 -defaultReplication=010
|
||||
```
|
||||
7. `docker-compose up` the master and volume. Because the volume server doesn't have the security config, the heartbeat should fail.
|
||||
8. Copy `security.toml` and `certs/` folder to server2 and add mounts in `docker-compose.yml` file of volume server.
|
||||
|
@ -79,13 +79,13 @@ services:
|
|||
11. Great, JWT auth works as expected. `docker-compose down`, remove port `9333` from master server `docker-compose.yml`, clean data directory `rm -rf /data/seaweedfs/master/*` and `rm -rf /data/seaweedfs/volume/*`
|
||||
12. Add caddyserver to master server `docker-compose.yml`. Caddy will automatically and without config issue a SSL cert from Lets Encrypt, redirect traffic from HTTP to HTTPS (on HTTP the header value can be sniffed, please remember to use HTTPS), and we will add config to check for `Authorization` header. A domain is needed for SSL. On master servers `docker-compose.yml`, add a new service:
|
||||
```yml
|
||||
caddy:
|
||||
image: caddy:2.3.0-alpine
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
caddy:
|
||||
image: caddy:2.3.0-alpine
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
```
|
||||
|
||||
Add `Caddyfile`
|
||||
|
@ -114,29 +114,29 @@ respond @notBearertoken 401
|
|||
```yml
|
||||
version: '3.7'
|
||||
services:
|
||||
volume-sda:
|
||||
build: .
|
||||
volumes:
|
||||
# /dev/sda4 mounts to /data
|
||||
- /data/seaweedfs/volume:/data/seaweedfs/volume
|
||||
- ./security.toml:/etc/seaweedfs/security.toml
|
||||
- ./certs:/etc/seaweedfs/certs
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 18080:18080
|
||||
command: weed volume -mserver=<master server ip>:9333 -dir=/data/seaweedfs/volume -ip=<publicIp>
|
||||
volume-sda:
|
||||
build: .
|
||||
volumes:
|
||||
# /dev/sda4 mounts to /data
|
||||
- /data/seaweedfs/volume:/data/seaweedfs/volume
|
||||
- ./security.toml:/etc/seaweedfs/security.toml
|
||||
- ./certs:/etc/seaweedfs/certs
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 18080:18080
|
||||
command: weed volume -mserver=<master server ip>:9333 -dir=/data/seaweedfs/volume -ip=<publicIp>
|
||||
|
||||
volume-sdb:
|
||||
build: .
|
||||
volumes:
|
||||
# /dev/sdb1 mounts to /data2
|
||||
- /data2/seaweedfs/volume:/data/seaweedfs/volume
|
||||
- ./security.toml:/etc/seaweedfs/security.toml
|
||||
- ./certs:/etc/seaweedfs/certs
|
||||
ports:
|
||||
- 8081:8081
|
||||
- 18081:18081
|
||||
command: weed volume -mserver=<master server ip>:9333 -dir=/data/seaweedfs/volume -ip=<publicIp> -port=8081
|
||||
volume-sdb:
|
||||
build: .
|
||||
volumes:
|
||||
# /dev/sdb1 mounts to /data2
|
||||
- /data2/seaweedfs/volume:/data/seaweedfs/volume
|
||||
- ./security.toml:/etc/seaweedfs/security.toml
|
||||
- ./certs:/etc/seaweedfs/certs
|
||||
ports:
|
||||
- 8081:8081
|
||||
- 18081:18081
|
||||
command: weed volume -mserver=<master server ip>:9333 -dir=/data/seaweedfs/volume -ip=<publicIp> -port=8081
|
||||
```
|
||||
|
||||
## High availability
|
||||
|
|
Loading…
Reference in a new issue