Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/CI-CD_Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
instance-ids: "i-084a4704f4e017cc4"
instance-ids: "i-04e6cdbebfead7150"
working-directory: /
comment: Deploy
command: |
Expand Down Expand Up @@ -270,6 +270,9 @@ jobs:
PROD_REDIS_PORT=6379
PROD_REDIS_PASSWORD=${{ secrets.REDIS_PASSWORD }}

RROD_QDRANT_HOST=qdrant_1
RROD_QDRANT_PORT=6334

send_email_address=${{ secrets.SEND_EMAIL_ADDRESS }}
email_address=${{ secrets.EMAIL_ADDRESS }}
send_email_password=${{ secrets.EMAIL_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public PasswordEncoder passwordEncoder() {
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(List.of("http://localhost:3000, https://www.trybalaw.com"));
configuration.setAllowedOrigins(List.of("http://localhost:3000, https://www.trybalaw.com, https://api.trybalaw.com"));
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
configuration.setAllowedHeaders(List.of("*"));
configuration.setAllowCredentials(true);
Expand Down
7 changes: 7 additions & 0 deletions backend/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ spring:
host: ${PROD_REDIS_HOST}
port: ${PROD_REDIS_PORT}
password: ${PROD_REDIS_PASSWORD}
ai:
vectorstore:
qdrant:
host: ${PROD_QDRANT_HOST}
port: ${RROD_QDRANT_PORT}
collection-name: legal_cases
vector-size: 1536
17 changes: 17 additions & 0 deletions infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,23 @@ CREATE DATABASE \`${var.app_1_db_name}\`;
FLUSH PRIVILEGES;
"

# Qdrant 설치
docker run -d \
--name qdrant_1 \
--restart unless-stopped \
--network common \
-p 6333:6333 \
-p 6334:6334 \
qdrant/qdrant

# Qdrant healthcheck 대기
echo "Qdrant가 준비될 때까지 대기 중..."
until curl -fs http://localhost:6333/healthz > /dev/null; do
echo "Qdrant가 아직 준비되지 않음. 5초 후 재시도..."
sleep 5
done
echo "Qdrant 준비 됨"

echo "${var.github_access_token_1}" | docker login ghcr.io -u ${var.github_access_token_1_owner} --password-stdin

END_OF_FILE
Expand Down