mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-14 00:54:07 +00:00
20 lines
417 B
Python
20 lines
417 B
Python
|
import os
|
||
|
|
||
|
import boto3
|
||
|
|
||
|
|
||
|
def main() -> int:
|
||
|
resource = boto3.resource(
|
||
|
service_name="s3",
|
||
|
endpoint_url="http://minio:9000",
|
||
|
region_name="us-east-1",
|
||
|
aws_access_key_id=os.getenv("MINIO_ACCESS_KEY"),
|
||
|
aws_secret_access_key=os.getenv("MINIO_SECRET_KEY"),
|
||
|
)
|
||
|
resource.create_bucket(Bucket="frappe")
|
||
|
return 0
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
raise SystemExit(main())
|