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

Commit fd8c0c1

Browse files
committed
Merge pull request #927 from BashtonLtd/scaling-ha-doc-and-mysql-driver
Scaling and HA documentation changes
2 parents 107da29 + eb436e6 commit fd8c0c1

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

ADVANCED.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,37 @@ requests to the Docker Registry:
9595
```
9696

9797

98+
## High Availability and Scaling
99+
100+
It is possible to run multiple containers against the same storage
101+
back-end for performance and availability reasons.
102+
103+
Here is an example using a shared s3 storage back-end, Redis cache and
104+
MySQL search database (all should be common across containers for
105+
consistency)
106+
107+
```
108+
docker run \
109+
-e SETTINGS_FLAVOR=s3 \
110+
-e AWS_BUCKET=mybucket \
111+
-e AWS_KEY=myawskey \
112+
-e AWS_SECRET=myawssecret \
113+
-e CACHE_REDIS_HOST=redis.host \
114+
-e CACHE_REDIS_PORT=6379 \
115+
-e CACHE_REDIS_DB=1 \
116+
-e CACHE_LRU_REDIS_HOST=redis.host \
117+
-e CACHE_LRU_REDIS_PORT=6379 \
118+
-e CACHE_LRU_REDIS_DB=0 \
119+
-e AWS_REGION=us-east-1 \
120+
-e SEARCH_BACKEND=sqlalchemy \
121+
-e SQLALCHEMY_INDEX_DATABASE=mysql://user:pass@mysql.host/db_name
122+
-p 5000:5000 \
123+
registry
124+
```
125+
126+
_note: Depending on your version of Docker you may need to add the
127+
appropriate python mysql drivers to the container_
128+
98129
## Alternative uses
99130

100131
If you don't want to run the registry inside a docker container, you may do so by running it directly, as follow:

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN apt-get update \
1616
python-pip \
1717
# Install deps for backports.lzma (python2 requires it)
1818
python-dev \
19+
python-mysqldb \
1920
python-rsa \
2021
libssl-dev \
2122
liblzma-dev \

0 commit comments

Comments
 (0)