Last active
July 28, 2019 15:51
-
-
Save himslm01/ed1f293a49bb205542150601fc5b9320 to your computer and use it in GitHub Desktop.
MinIO Docker Lets Encrypt Certbot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy certbot certificate into Docker host: | |
$ scp etc/live/<domain>/fullchain.pem <host>:~/minio_certs/public.crt | |
$ scp etc/live/<domain>/privkey.pem <host>:~/minio_certs/private.key | |
Test with: | |
$ docker run -it --rm --name minio \ | |
-p 9000:9000 \ | |
-v /home/$USER/minio_certs:/certs \ | |
-v /var/volumes/wd3tb01:/data1 \ | |
-v /var/volumes/wd3tb02:/data2 \ | |
-v /var/volumes/wd3tb03:/data3 \ | |
-v /var/volumes/wd3tb04:/data4 \ | |
minio/minio server --certs-dir=/certs /data1 /data2 /data3 /data4 | |
Remember to note down the AccessKey and SecretKey. | |
Run as service with: | |
$ docker run -d --restart unless-stopped --name minio \ | |
-p 9000:9000 \ | |
-v /home/$USER/minio_certs:/certs \ | |
-v /var/volumes/wd3tb01:/data1 \ | |
-v /var/volumes/wd3tb02:/data2 \ | |
-v /var/volumes/wd3tb03:/data3 \ | |
-v /var/volumes/wd3tb04:/data4 \ | |
minio/minio server --certs-dir=/certs /data1 /data2 /data3 /data4 | |
Mount onto Linux using s3fs - assume the bucket name is 'test' and you want to use the default s3fs passwords file: | |
$ sudo apt install s3fs # s3fs is in the universe repository | |
$ touch ~/.passwd-s3fs | |
$ chmod 0600 ~/.passwd-s3fs | |
$ echo "test:<AccessKey>:<SecretKey>"|tee -a ~/.passwd-s3fs | |
$ mkdir $HOME/test | |
$ s3fs -o "url=https://<host>:9000,use_path_request_style" test $HOME/test | |
If you need to debug what's going on then run s3fs in the forground with debugging enabled: | |
$ s3fs -f -o "url=https://<host>:9000,use_path_request_style,dbglevel=info,curldbg" tests $HOME/test | |
If you don't want to use the default passwords file then write the bucket:AccessKey:SecretKey into another file | |
and use the -o passwd_file=<filename> option. | |
http://manpages.ubuntu.com/manpages/bionic/man1/s3fs.1.html | |
https://github.com/minio/cookbook/blob/master/docs/s3fs-fuse-with-minio.md | |
http://www.ispcolohost.com/2013/10/23/s3fs-rsync-recommendations/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment