Skip to content

Commit 6797b0c

Browse files
docs: add bucket creation docs
1 parent 606bd3c commit 6797b0c

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

README.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,46 @@ export DATABASE_URL="postgresql://oc4ids_datastore@localhost/oc4ids_datastore"
2929
alembic upgrade head
3030
```
3131

32-
### S3 environment variables
32+
### DigitalOcean Spaces bucket setup
3333

34-
To enable files to be uploaded to S3-compatible storage, the following environment variables must be set:
34+
If enabled, the pipeline will upload the files to a [DigitalOcean Spaces](https://www.digitalocean.com/products/spaces) bucket.
35+
36+
#### Create the bucket
37+
38+
First create the bucket with DigitalOcean.
39+
40+
If doing this via the UI, take the following steps:
41+
42+
1. Choose any region
43+
2. Enable CDN
44+
3. Choose any bucket name
45+
4. Click "Create a Spaces Bucket"
46+
47+
#### Create access key
48+
49+
After the bucket is created, create an access key in DigitalOcean.
50+
51+
If doing this via the UI, take the following steps:
52+
53+
1. Go to your bucket
54+
2. Go to settings
55+
3. Under "Access Keys" click "Create Access Key"
56+
4. Set the access scope to "Limited Access"
57+
5. Select your bucket from the list and set "Permissions" to "Read/Write/Delete"
58+
6. Choose any name
59+
7. Click "Create Access Key"
60+
61+
Securely store the access key ID and secret.
62+
63+
#### Set the required environment variables
64+
65+
Once you have created the bucket and access key, set the following environment variables for the pipeline:
3566

3667
- `ENABLE_UPLOAD`: 1 to enable, 0 to disable
37-
- `BUCKET_REGION`:
38-
- `BUCKET_NAME`
39-
- `BUCKET_ACCESS_KEY_ID`
40-
- `BUCKET_ACCESS_KEY_SECRET`
68+
- `BUCKET_REGION`: e.g. `fra1`
69+
- `BUCKET_NAME`: e.g. `my-bucket`
70+
- `BUCKET_ACCESS_KEY_ID`: e.g. `access-key-id`
71+
- `BUCKET_ACCESS_KEY_SECRET`: e.g. `access-key-secret`
4172

4273
To make this easier, the project uses [`python-dotenv`](https://github.com/theskumar/python-dotenv) to load environment variables from a config file.
4374
For local development, create a file called `.env.local`, which will be used by default.

0 commit comments

Comments
 (0)