File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Build and Deploy to AWS
1+ name : Build and Deploy to ECR
22
33on :
44 push :
@@ -32,11 +32,11 @@ jobs:
3232 env :
3333 ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
3434 ECR_REPOSITORY : devcolor00-school
35- IMAGE_TAG : ${{ github.sha }}
35+ IMAGE_TAG : dev
3636 run : |
37- docker build -f docker/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
37+ docker build -f docker/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:dev .
3838 docker build -f docker/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
39- docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
39+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:dev
4040 docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
4141
4242 # - name: Deploy to App Runner
Original file line number Diff line number Diff line change @@ -135,12 +135,12 @@ Standard HTTP status codes are used to indicate success or failure:
135135
1361361 . ** Build the Docker image:**
137137``` bash
138- docker build -f docker/Dockerfile -t devcolor-backend:prod .
138+ docker build -f docker/Dockerfile -t devcolor-backend:dev .
139139```
140140
1411412 . ** Run the container:**
142142``` bash
143- docker run -p 8000:8000 --env-file .env devcolor-backend:prod
143+ docker run -p 8000:8000 --env-file .env devcolor-backend:dev
144144```
145145
146146### Using Docker Compose
@@ -217,7 +217,7 @@ The workflow runs automatically on:
217217- Pushes to `main` or `develop` branches
218218- Pull requests to the `main` branch
219219
220- The Docker image will be tagged as `devcolor-backend:prod ` and pushed to Docker Hub .
220+ The Docker image will be tagged as `devcolor-backend:dev ` and `devcolor-backend:latest` and pushed to ECR .
221221
222222**Install required packages:**
223223` ` ` bash
You can’t perform that action at this time.
0 commit comments