Setting up digital ocean spaces to upload
Gotta work on my upload scrips
- tags
- aws
- s3
- ruby
- node
- golang
- deno
- digitalocean
Contents
Setup the space
Config and keys
First go and create a new space.
Then generate a new spaces accesskey.
Then create a .env file that contains the following variables.
AWS_ACCESS_KEY_ID | From digital ocean |
AWS_SECRET_ACCESS_KEY | From digitial ocean |
AWS_END_POINT | From the settings tab of your space |
BUCKET_NAME | Name of the bucket |
My end point is nyc3.digitaloceanspaces.com
If you need to set a region, I pass in us-east-1 which seemed to work.
(Optional) Putting the config inside of a kubernetes
Just for my future reference
| |
CDN and DNS
Enable the CDN as documented here. This works if you have a digital ocean hosted domain.
I added a letencrypt cert to a subdomain, and everything zipped right along.
Upload with ruby
I'm using inline gems here so you don't need to create a Gemfile
| |
Upload with node
| |
upload.js:
| |
Upload with go
Setup the environment:
| |
Then upload.go:
| |
Upload with deno
| |
Previously
Next