@@ -29,15 +29,46 @@ export DATABASE_URL="postgresql://oc4ids_datastore@localhost/oc4ids_datastore"
29
29
alembic upgrade head
30
30
```
31
31
32
- ### S3 environment variables
32
+ ### DigitalOcean Spaces bucket setup
33
33
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:
35
66
36
67
- ` 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 `
41
72
42
73
To make this easier, the project uses [ ` python-dotenv ` ] ( https://github.com/theskumar/python-dotenv ) to load environment variables from a config file.
43
74
For local development, create a file called ` .env.local ` , which will be used by default.
0 commit comments