Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 5f60c77

Browse files
committed
Merge pull request #726 from shreyu86/cf-example
Added sample config for cloudfront with S3
2 parents 3e3c6c3 + a4bdbdf commit 5f60c77

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

ADVANCED.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,32 @@ docker run \
184184
-p 5000:5000 \
185185
registry
186186
```
187+
## S3 Storage with Cloudfront
188+
It is possible Cloudfront in tandem with S3 storage, you need to configure Cloudfront to point it to your S3 bucket.
189+
190+
This flavor can be started as:
191+
```
192+
docker run \
193+
-e SETTINGS_FLAVOR=cloudfronts3 \
194+
-e AWS_BUCKET=mybucket \
195+
-e STORAGE_PATH=/registry \
196+
-e AWS_KEY=myawskey \
197+
-e AWS_SECRET=myawssecret \
198+
-e SEARCH_BACKEND=sqlalchemy \
199+
-e AWS_SECURE=false \
200+
-e AWS_ENCRYPT=false \
201+
-e AWS_PORT=80 \
202+
-e AWS_DEBUG=true \
203+
-e CF_BASE_URL=cloudfront_url
204+
-e CF_KEYID=cloudfront_key_id
205+
-e CF_KEYSECRET=cloudfront_private_key
206+
-p 5000:5000 \
207+
registry
208+
```
209+
`CF_BASE_URL` is the Cloudfront base URL example: https://abcd.cloudfront.net
210+
`CF_KEYID` is the ID of the Cloudfront keypair you are going to use to sign the URLs so the the registry can 302 to Cloudfront.
211+
`CF_KEYSECRET` is either the private key as string or file location of the private key used to sign the URLS.
212+
187213

188214
## Microsoft Azure Blob Storage
189215

config/config_sample.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ s3: &s3
9090
boto_port: _env:AWS_PORT
9191
boto_calling_format: _env:AWS_CALLING_FORMAT
9292

93+
cloudfronts3: &cloudfronts3
94+
<<: *s3
95+
cloudfront:
96+
base: _env:CF_BASE_URL
97+
keyid: _env:CF_KEYID
98+
keysecret: _env:CF_KEYSECRET
9399

94100
azureblob: &azureblob
95101
<<: *common

0 commit comments

Comments
 (0)