notebook
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
# =============================================================================
|
||||
# SeaweedFS — S3-kompatibilní úložiště na Unraidu (Docker)
|
||||
# Vyladěná verze: persistence VŠECH dat, S3 přihlášení, healthcheck, restart.
|
||||
#
|
||||
# Spuštění:
|
||||
# docker compose -p seaweedfs up -d
|
||||
# (na starším Unraidu: docker-compose -f docker-compose.yml -p seaweedfs up -d)
|
||||
#
|
||||
# Endpoints (nahraď UNRAID-IP IP adresou serveru):
|
||||
# Master UI : http://UNRAID-IP:9333
|
||||
# Filer/web : http://UNRAID-IP:8888
|
||||
# S3 API : http://UNRAID-IP:8333
|
||||
# Volume : http://UNRAID-IP:8080 (interní, kvůli debugu)
|
||||
#
|
||||
# DŮLEŽITÉ: před produkčním použitím změň klíče v config_s3.json!
|
||||
# =============================================================================
|
||||
|
||||
x-image: &swimg chrislusf/seaweedfs:4.32 # pin verze (ne :latest) kvůli reprodukovatelnosti
|
||||
|
||||
services:
|
||||
seaweed-master:
|
||||
image: *swimg
|
||||
container_name: seaweed-master
|
||||
command: >
|
||||
master -ip=seaweed-master -ip.bind=0.0.0.0
|
||||
-mdir=/data -volumeSizeLimitMB=1024 -defaultReplication=000
|
||||
ports:
|
||||
- "9333:9333"
|
||||
volumes:
|
||||
# metadata masteru — cache OK: po ztrátě se poskládá z heartbeatů volume serverů
|
||||
- /mnt/user/appdata/seaweedfs/master:/data
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:9333/cluster/status"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
seaweed-volume:
|
||||
image: *swimg
|
||||
container_name: seaweed-volume
|
||||
command: >
|
||||
volume -mserver=seaweed-master:9333 -ip=seaweed-volume -ip.bind=0.0.0.0
|
||||
-dir=/data -max=0
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
# POZOR: vlastní obsah (roste do TB) -> na POLE, NE do appdata/cache!
|
||||
# Vyžaduje share "seaweedfs" s primary storage = Array (cache=No).
|
||||
- /mnt/user/seaweedfs/volume:/data
|
||||
depends_on:
|
||||
seaweed-master:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
seaweed-filer:
|
||||
image: *swimg
|
||||
container_name: seaweed-filer
|
||||
command: >
|
||||
filer -master=seaweed-master:9333 -ip=seaweed-filer -ip.bind=0.0.0.0
|
||||
ports:
|
||||
- "8888:8888"
|
||||
volumes:
|
||||
# filer metadata -> externí DB dle filer.toml (Mongo/Postgres) = chráněné.
|
||||
- ./filer.toml:/etc/seaweedfs/filer.toml:ro
|
||||
# Jen pokud ve filer.toml zvolíš variantu C (leveldb2): odkomentuj a dej na POLE
|
||||
# - /mnt/user/seaweedfs/filermeta:/data
|
||||
depends_on:
|
||||
seaweed-master:
|
||||
condition: service_healthy
|
||||
seaweed-volume:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
seaweed-s3:
|
||||
image: *swimg
|
||||
container_name: seaweed-s3
|
||||
command: >
|
||||
s3 -filer=seaweed-filer:8888 -ip.bind=0.0.0.0
|
||||
-config=/etc/seaweedfs/config_s3.json
|
||||
ports:
|
||||
- "8333:8333"
|
||||
volumes:
|
||||
- ./config_s3.json:/etc/seaweedfs/config_s3.json:ro # S3 přihlašovací údaje (read-only)
|
||||
depends_on:
|
||||
seaweed-filer:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user