1 Docker Compose for S3
Chris Lu edited this page 2024-10-02 15:58:17 -07:00

To use SeaweedFS S3 API, here is the simplest form:

version: '3.8'

services:
  seaweedfs-s3:
    image: chrislusf/seaweedfs
    container_name: seaweedfs-s3
    ports:
      - "8333:8333"
    entrypoint: /bin/sh -c
    command: |
      "echo '{
        \"identities\": [
          {
            \"name\": \"anonymous\",
            \"actions\": [
              \"Read\"
            ]
          },
          {
            \"name\": \"some_admin_user\",
            \"credentials\": [
              {
                \"accessKey\": \"some_access_key1\",
                \"secretKey\": \"some_secret_key1\"
              }
            ],
            \"actions\": [
              \"Admin\",
              \"Read\",
              \"List\",
              \"Tagging\",
              \"Write\"
            ]
          }
        ]
      }' > /etc/seaweedfs/config.json && \
      weed server -s3 -s3.config /etc/seaweedfs/config.json"
    restart: unless-stopped