Skip to content

Commit

Permalink
separate docker files for main and dev
Browse files Browse the repository at this point in the history
update dev-push workflow
  • Loading branch information
dmdhrumilmistry committed Oct 28, 2023
1 parent ad91b32 commit 478c354
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 20 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/dev-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "dev"

jobs:
push-base-docker-image:
build-and-push-dev-docker-images:
runs-on: ubuntu-latest
steps:
- name: Branch Checkout
Expand All @@ -20,34 +20,35 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- name: Build and push offat-base docker image
uses: docker/build-push-action@v3
with:
context: ./src/
file: ./src/DockerFiles/base-Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat-base:dev
platforms: linux/amd64,linux/arm64

push-cli-docker-image:
runs-on: ubuntu-latest
steps:
- name: Branch Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- name: Build and push offat docker image
uses: docker/build-push-action@v3
with:
context: ./src/
file: ./src/DockerFiles/cli-Dockerfile
file: ./src/DockerFiles/dev/cli-Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat:dev
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64
- name: Build and push offat-api docker image
uses: docker/build-push-action@v3
with:
context: ./src/
file: ./src/DockerFiles/dev/backend-api-Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat-api:dev
platforms: linux/amd64,linux/arm64
- name: Build and push offat-api-worker docker image
uses: docker/build-push-action@v3
with:
context: ./src/
file: ./src/DockerFiles/dev/backend-api-worker-Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/offat-api-worker:dev
platforms: linux/amd64,linux/arm64
5 changes: 5 additions & 0 deletions src/DockerFiles/dev/backend-api-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM dmdhrumilmistry/offat-base:dev

EXPOSE 8000

ENTRYPOINT [ "python", "-m", "offat.api" ]
5 changes: 5 additions & 0 deletions src/DockerFiles/dev/backend-api-worker-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM dmdhrumilmistry/offat-base:dev

WORKDIR /offat

ENTRYPOINT [ "rq", "worker", "offat_task_queue" ]
3 changes: 3 additions & 0 deletions src/DockerFiles/dev/cli-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM dmdhrumilmistry/offat-base:dev

ENTRYPOINT [ "offat" ]
File renamed without changes.
File renamed without changes.

0 comments on commit 478c354

Please sign in to comment.