Skip to content

Commit

Permalink
Configure deploy to Amazon Elastic Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimagaa committed Nov 22, 2023
1 parent 625fbc0 commit 69b4e50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 121 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
name: Deploy to ECS
name: Deploy to ECR

on:
push:
branches: [ main ]

env:
AWS_REGION: us-east-1
AWS_ASSUME_ROLE: arn:aws:iam::410123344539:role/github-book-store-repository
ECR_REPOSITORY: botblend
ECS_SERVICE: botblend
ECS_CLUSTER: BotBlendCluster
ECS_TASK_DEFINITION: .github/workflows/task-definition.json
CONTAINER_NAME: botblend
AWS_ASSUME_ROLE: arn:aws:iam::410123344539:role/github-botblend-role

permissions:
id-token: write
Expand Down Expand Up @@ -53,24 +48,8 @@ jobs:
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REGISTRY_ALIAS: w5z6u3w9
REPOSITORY: online-book-store
REPOSITORY: botblend
IMAGE_TAG: latest
run: |
docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: my-container
image: ${{ steps.build-image.outputs.image }}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: my-service
cluster: my-cluster
wait-for-service-stability: true
95 changes: 0 additions & 95 deletions .github/workflows/task-definition.json

This file was deleted.

6 changes: 4 additions & 2 deletions src/main/java/com/app/botblend/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ public class SecurityConfig {
private static final String AUTHORIZED_URL = "/auth/**";
private static final String ERROR_PAGE_URL = "/error";
private static final String SWAGGER_UI_ENDPOINT = "/swagger-ui/**";

private static final String SWAGGER_API_ENDPOINT = "/v3/api-docs/**";
private static final String HEALTHCHECK_ENDPOINT = "/healthcheck";

private final UserDetailsService userDetailsService;
private final JwtAuthenticationFilter jwtAuthenticationFilter;
private final ExceptionHandlerFilter exceptionHandlerFilter;
Expand All @@ -55,7 +56,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws
AUTHORIZED_URL,
ERROR_PAGE_URL,
SWAGGER_UI_ENDPOINT,
SWAGGER_API_ENDPOINT
SWAGGER_API_ENDPOINT,
HEALTHCHECK_ENDPOINT
)
.permitAll()
.anyRequest()
Expand Down

0 comments on commit 69b4e50

Please sign in to comment.