sweed
This commit is contained in:
parent
43e49168ad
commit
88ffc11819
3 changed files with 57 additions and 0 deletions
40
apps/infoalloggi/dev2-docker-compose.yml
Normal file
40
apps/infoalloggi/dev2-docker-compose.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
services:
|
||||||
|
seaweedfs:
|
||||||
|
image: chrislusf/seaweedfs:latest
|
||||||
|
container_name: seaweedfs
|
||||||
|
expose:
|
||||||
|
- 9333 # Master
|
||||||
|
- 8888 # Filer (Internal File System)
|
||||||
|
- 8333 # S3 API endpoint
|
||||||
|
volumes:
|
||||||
|
- seaweedfs_data:/data
|
||||||
|
# Mount your credentials file directly into the container
|
||||||
|
- ./s3.json:/data/s3.json
|
||||||
|
# -s3.config points to our mounted credentials file
|
||||||
|
command: "server -dir=/data -s3 -s3.config=/data/s3.json"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:9333/cluster/status"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
|
||||||
|
# 1. Routing Rule: Listen for your Public IP (e.g., 123.45.67.89)
|
||||||
|
# If you don't have a static IP, you can use a catch-all rule: "PathPrefix(`/`)"
|
||||||
|
- "traefik.http.routers.filer.rule=Host(`fs.marcopedone.it`)"
|
||||||
|
- "traefik.http.routers.filer.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.filer.service=filer"
|
||||||
|
- "traefik.http.routers.filer.tls.certresolver=letsencrypt"
|
||||||
|
|
||||||
|
# 2. Assign the Service Port (SeaweedFS filer runs internally on 8888)
|
||||||
|
- "traefik.http.services.filer.loadbalancer.server.port=8888"
|
||||||
|
|
||||||
|
# 3. Attach the Auth Middleware to this Router
|
||||||
|
- "traefik.http.routers.filer.middlewares=filer-auth"
|
||||||
|
|
||||||
|
# 4. Define the Middleware (Paste your generated hashed string here)
|
||||||
|
- "traefik.http.middlewares.filer-auth.basicauth.users=admin:$$2a$$12$$2w9VLBATy0eHhU4IAIg8t.bz9/ZSzS9yf5uv4Hn1nUhp28ZY7An8y"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
seaweedfs_data:
|
||||||
14
apps/infoalloggi/s3.json
Normal file
14
apps/infoalloggi/s3.json
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"identities": [
|
||||||
|
{
|
||||||
|
"name": "nextjs-go-app",
|
||||||
|
"credentials": [
|
||||||
|
{
|
||||||
|
"accessKey": "my_secure_access_key",
|
||||||
|
"secretKey": "my_super_secret_key"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": ["Admin", "Read", "Write"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -151,6 +151,9 @@ services:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
storage:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
maintenance-page:
|
maintenance-page:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue