Skip to content

Instantly share code, notes, and snippets.

@mehdiben7
Last active February 13, 2024 04:50
Show Gist options
  • Save mehdiben7/466bbaccfba770bd3dc1a5667ec9ed78 to your computer and use it in GitHub Desktop.
Save mehdiben7/466bbaccfba770bd3dc1a5667ec9ed78 to your computer and use it in GitHub Desktop.
Setup Scality Selfhosted S3 Bucket
SCALITY_ACCESS_KEY_ID=newAccessKey
SCALITY_SECRET_ACCESS_KEY=newSecretKey
ENDPOINT=http://localhost:26822/
S3_BUCKET_NAME=seau
S3BACKEND=mem
version: '3.9'
services:
s3-mock:
image: zenko/cloudserver
env_file: .env
ports:
- 26822:8000
hostname: s3-mock
container_name: s3-mock
#!/bin/bash
rm ~/.aws/credentials ~/.aws/config
echo -e "[default] \naws_access_key_id = ${SCALITY_ACCESS_KEY_ID} \naws_secret_access_key = ${SCALITY_SECRET_ACCESS_KEY}" >> ~/.aws/credentials
echo -e "[default] \nregion = us-east-1" >> ~/.aws/config
echo "All buckets in the S3 instance:"
aws s3 ls --endpoint-url=${ENDPOINT}
echo "Attempt to create bucket ${S3_BUCKET_NAME}"
aws --endpoint-url=${ENDPOINT} s3 mb s3://${S3_BUCKET_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment