Skip to content

Commit

Permalink
Mirror with Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram committed Apr 29, 2019
1 parent d98e553 commit 1bfb691
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
19 changes: 17 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ executors:
docker-publisher:
environment:
IMAGE_NAME: quay.io/islamic-network/api.alquran.cloud
IMAGE_NAME_DH: islamicnetwork/api.alquran.cloud
docker:
- image: circleci/buildpack-deps:stretch
php72:
Expand Down Expand Up @@ -70,11 +71,18 @@ jobs:
name: Load archived Docker image
command: docker load -i /tmp/workspace/prod.tar
- run:
name: Publish Docker Image to Docker Hub
name: Publish Docker Image to QUAY.IO
command: |
echo "$QUAYIO_PASSWORD" | docker login quay.io -u "$QUAYIO_USERNAME" --password-stdin
IMAGE_TAG="${CIRCLE_BUILD_NUM}"
docker push $IMAGE_NAME:latest
- run:
name: Publish Docker Image to Docker Hub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
IMAGE_TAG="${CIRCLE_BUILD_NUM}"
docker tag $IMAGE_NAME:latest $IMAGE_NAME_DH:latest
docker push $IMAGE_NAME_DH:latest
publish-docker-tag:
executor: docker-publisher
steps:
Expand All @@ -85,12 +93,19 @@ jobs:
name: Load archived Docker image
command: docker load -i /tmp/workspace/prod.tar
- run:
name: Publish Docker Image to Docker Hub
name: Publish Docker Image to QUAY.IO
command: |
echo "$QUAYIO_PASSWORD" | docker login quay.io -u "$QUAYIO_USERNAME" --password-stdin
IMAGE_TAG=${CIRCLE_TAG}
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:$IMAGE_TAG
- run:
name: Publish Docker Image to Docker Hub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
IMAGE_TAG=${CIRCLE_TAG}
docker tag $IMAGE_NAME:latest $IMAGE_NAME_DH:$IMAGE_TAG
docker push $IMAGE_NAME_DH:$IMAGE_TAG
workflows:
version: 2
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ This repository powers the AlQuran.cloud API on http://api.alquran.cloud.

The api and all its dependencies are fully Dockerised. You **just need docker and docker-compose** to spin everything up.

A production ready Docker image of the api is published as quay.io/islamic-network/api.alquran.cloud on Quay.io.
A production ready Docker image of the api is published as:
* quay.io/islamic-network/api.alquran.cloud on Quay
* islamicnetwork/api.alquran.cloud on Docker Hub

To get your own instance up, simply run:

Expand Down

0 comments on commit 1bfb691

Please sign in to comment.