Skip to content

Commit

Permalink
Merge pull request #725 from CodeForAfrica/fix/ui_dockerfiles
Browse files Browse the repository at this point in the history
Single Multi-Stage Dockerfile for the repo
  • Loading branch information
kilemensi authored Jun 21, 2024
2 parents 0414394 + 16f3e18 commit ad566d5
Show file tree
Hide file tree
Showing 46 changed files with 3,101 additions and 3,205 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Include application-specific Dockerfiles e.g. Dockerfile.charterafrica
Dockerfile*
# Include application-specific Dockerfiles e.g. charterafrica.Dockerfile
*Dockerfile
.dockerignore
**/node_modules
npm-debug.log
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/charterafrica-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]
paths:
- "apps/charterafrica/**"
- "Dockerfile.charterafrica"
- "charterafrica.Dockerfile"
- ".github/workflows/charterafrica-deploy-dev.yml"

# This allows a subsequently queued workflow run to interrupt previous runs
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: ./Dockerfile.charterafrica
file: ./charterafrica.Dockerfile
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/charterafrica-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: ./Dockerfile.charterafrica
file: ./charterafrica.Dockerfile
push: true
tags: "${{ env.IMAGE_NAME }}:${{ steps.version-check.outputs.version }}"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeforafrica-deploy-dev-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]
paths:
- "apps/codeforafrica/**"
- "Dockerfile.codeforafrica"
- "codeforafrica.Dockerfile"
- ".github/workflows/codeforafrica-deploy-dev-app.yml"

concurrency:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: ./Dockerfile.codeforafrica
file: ./codeforafrica.Dockerfile
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeforafrica-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: ./Dockerfile.codeforafrica
file: ./codeforafrica.Dockerfile
push: true
tags: "${{ env.IMAGE_NAME }}:${{ steps.version-check.outputs.version }}"

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/codeforafrica-deploy-review-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
pull_request:
paths:
- "apps/codeforafrica/**"
- "Dockerfile.codeforafrica"
- "codeforafrica.Dockerfile"
- ".github/workflows/codeforafrica-deploy-review-app.yml"
# By default, a workflow only runs when a pull_request event's activity type is opened, synchronize, or reopened.
# By default, a workflow only runs when a pull_request event's activity
# type is opened, synchronize, or reopened. We need at least closed to
# be able to destroy preview app
types: [opened, reopened, closed, synchronize]
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
Expand All @@ -22,7 +24,7 @@ env:
APP_NAME: codeforafrica-ui-pr-${{ github.event.pull_request.number }}

jobs:
review_app:
deploy_review_app:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -64,7 +66,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: ./Dockerfile.codeforafrica
file: ./codeforafrica.Dockerfile
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pesayetu-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: Dockerfile.pesayetu
target: vpnmanager-runner
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/roboshield-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]
paths:
- "apps/roboshield/**"
- "Dockerfile.roboshield"
- "roboshield.Dockerfile"
- ".github/workflows/roboshield-dev.yml"

concurrency:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: Dockerfile.roboshield
file: roboshield.Dockefile
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vpnmanager-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
file: ./Dockerfile.vpnmanager
target: vpnmanager-runner
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"

Expand Down
Loading

0 comments on commit ad566d5

Please sign in to comment.