From fa09ada9540a3424393b9e0cf0279ba8e0721b43 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Thu, 14 May 2026 10:25:57 +0200 Subject: [PATCH] moved storage --- apps/infoalloggi/dev2-docker-compose.yml | 38 ------------------------ apps/storage/dev-docker-compose.yml | 33 ++++++++++++++++++++ apps/storage/docker-compose.yml | 35 ++++++++++++++++++++++ apps/{infoalloggi => storage}/s3.json | 0 4 files changed, 68 insertions(+), 38 deletions(-) delete mode 100644 apps/infoalloggi/dev2-docker-compose.yml create mode 100644 apps/storage/dev-docker-compose.yml create mode 100644 apps/storage/docker-compose.yml rename apps/{infoalloggi => storage}/s3.json (100%) diff --git a/apps/infoalloggi/dev2-docker-compose.yml b/apps/infoalloggi/dev2-docker-compose.yml deleted file mode 100644 index 0d78ab2..0000000 --- a/apps/infoalloggi/dev2-docker-compose.yml +++ /dev/null @@ -1,38 +0,0 @@ -services: - seaweedfs: - image: chrislusf/seaweedfs:latest - ports: - - "9333:9333" - - "8333:8333" # S3 API endpoint for Next.js / Go backend apps - - "8888:8888" - 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.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: diff --git a/apps/storage/dev-docker-compose.yml b/apps/storage/dev-docker-compose.yml new file mode 100644 index 0000000..4d411c7 --- /dev/null +++ b/apps/storage/dev-docker-compose.yml @@ -0,0 +1,33 @@ +services: + seaweedfs: + image: chrislusf/seaweedfs:latest + ports: + - "9333:9333" + - "8333:8333" + - "8888:8888" + volumes: + - seaweedfs_data:/data + - ./s3.json:/data/s3.json:ro + - ./security.toml:/data/security.toml:ro + command: > + server -dir=/data -filer + -s3 -s3.config=/data/s3.json + -iam.config=/data/security.toml + healthcheck: + test: ["CMD-SHELL", + "curl -sf http://localhost:9333/cluster/status && curl -sf http://localhost:8888/"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + labels: + - "traefik.enable=true" + - "traefik.http.routers.filer.rule=Host(`fs.marcopedone.it`)" + - "traefik.http.routers.filer.entrypoints=websecure" + - "traefik.http.routers.filer.tls.certresolver=letsencrypt" + - "traefik.http.services.filer.loadbalancer.server.port=8888" + - "traefik.http.routers.filer.middlewares=filer-auth" + - "traefik.http.middlewares.filer-auth.basicauth.users=admin:$2a$12$2w9VLBATy0eHhU4IAIg8t.bz9/ZSzS9yf5uv4Hn1nUhp28ZY7An8y" + +volumes: + seaweedfs_data: \ No newline at end of file diff --git a/apps/storage/docker-compose.yml b/apps/storage/docker-compose.yml new file mode 100644 index 0000000..655c5b7 --- /dev/null +++ b/apps/storage/docker-compose.yml @@ -0,0 +1,35 @@ +services: + seaweedfs: + image: chrislusf/seaweedfs:latest + ports: + - "9333:9333" + - "8333:8333" + - "8888:8888" + networks: + - dokploy-network + volumes: + - seaweedfs_data:/data + - ./s3.json:/data/s3.json:ro + - ./security.toml:/data/security.toml:ro + command: > + server -dir=/data -filer + -s3 -s3.config=/data/s3.json + -iam.config=/data/security.toml + healthcheck: + test: ["CMD-SHELL", + "curl -sf http://localhost:9333/cluster/status && curl -sf http://localhost:8888/"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + labels: + - "traefik.enable=true" + - "traefik.http.routers.filer.rule=Host(`fs.marcopedone.it`)" + - "traefik.http.routers.filer.entrypoints=websecure" + - "traefik.http.routers.filer.tls.certresolver=letsencrypt" + - "traefik.http.services.filer.loadbalancer.server.port=8888" + - "traefik.http.routers.filer.middlewares=filer-auth" + - "traefik.http.middlewares.filer-auth.basicauth.users=admin:$2a$12$2w9VLBATy0eHhU4IAIg8t.bz9/ZSzS9yf5uv4Hn1nUhp28ZY7An8y" + +volumes: + seaweedfs_data: \ No newline at end of file diff --git a/apps/infoalloggi/s3.json b/apps/storage/s3.json similarity index 100% rename from apps/infoalloggi/s3.json rename to apps/storage/s3.json