Skip to content

Commit

Permalink
Restructure folder names for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
vectornguyen76 committed Dec 1, 2024
1 parent 0d8df34 commit 6af8eb2
Show file tree
Hide file tree
Showing 579 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ansible/deploy_applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
- ansible_host_key_checking: false
- ansible_stdout_callback: yaml

- image_search_image: vectornguyen76/image-search-engine
- image_search_image: vectornguyen76/image_search
- image_search_tag: latest

- text_search_image: vectornguyen76/text-search-engine
- text_search_image: vectornguyen76/text_search
- text_search_tag: latest

- backend_image: vectornguyen76/backend-search-engine
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/development_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# uses: actions/cache@v2
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('./image-search-engine/requirements.txt') }}
# key: ${{ runner.os }}-pip-${{ hashFiles('./image_search/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-image-search

Expand All @@ -30,19 +30,19 @@ jobs:
cache: "pip"

- name: Install Dependencies
run: pip install -r ./image-search-engine/requirements.txt
run: pip install -r ./image_search/requirements.txt

- name: Run isort
run: isort --check-only --profile=black ./image-search-engine/.
run: isort --check-only --profile=black ./image_search/.

- name: Run black
run: black --check ./image-search-engine/.
run: black --check ./image_search/.

- name: Run flake8
run: flake8 --ignore=E501,W503,F401 ./image-search-engine
run: flake8 --ignore=E501,W503,F401 ./image_search

# - name: Run Pylint
# run: pylint ./image-search-engine/*.py
# run: pylint ./image_search/*.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -57,9 +57,9 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./image-search-engine
context: ./image_search
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/image-search-engine:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/image_search:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -76,19 +76,19 @@ jobs:
cache: "pip"

- name: Install Dependencies
run: pip install -r ./text-search-engine/requirements.txt
run: pip install -r ./text_search/requirements.txt

- name: Run isort
run: isort --check-only ./text-search-engine/.
run: isort --check-only ./text_search/.

- name: Run black
run: black --check ./text-search-engine/.
run: black --check ./text_search/.

- name: Run flake8
run: flake8 --ignore=E501,W503,F401 ./text-search-engine
run: flake8 --ignore=E501,W503,F401 ./text_search

# - name: Run Pylint
# run: pylint ./image-search-engine/*.py
# run: pylint ./image_search/*.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -103,9 +103,9 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./text-search-engine
context: ./text_search
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/text-search-engine:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/text_search:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/production_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
cache: "pip"

- name: Install Dependencies
run: pip install -r ./image-search-engine/requirements.txt
run: pip install -r ./image_search/requirements.txt

- name: Run isort
run: isort --check-only --profile=black ./image-search-engine/.
run: isort --check-only --profile=black ./image_search/.

- name: Run black
run: black --check ./image-search-engine/.
run: black --check ./image_search/.

- name: Run flake8
run: flake8 --ignore=E501,W503,F401 ./image-search-engine
run: flake8 --ignore=E501,W503,F401 ./image_search

# - name: Run Pylint
# run: pylint ./image-search-engine/*.py
# run: pylint ./image_search/*.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -44,9 +44,9 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./image-search-engine
context: ./image_search
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/image-search-engine:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/image_search:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -63,19 +63,19 @@ jobs:
cache: "pip"

- name: Install Dependencies
run: pip install -r ./text-search-engine/requirements.txt
run: pip install -r ./text_search/requirements.txt

- name: Run isort
run: isort --check-only ./text-search-engine/.
run: isort --check-only ./text_search/.

- name: Run black
run: black --check ./text-search-engine/.
run: black --check ./text_search/.

- name: Run flake8
run: flake8 --ignore=E501,W503,F401 ./text-search-engine
run: flake8 --ignore=E501,W503,F401 ./text_search

# - name: Run Pylint
# run: pylint ./image-search-engine/*.py
# run: pylint ./image_search/*.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -90,9 +90,9 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./text-search-engine
context: ./text_search
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/text-search-engine:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/text_search:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/staging_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
cache: "pip"

- name: Install Dependencies
run: pip install -r ./image-search-engine/requirements.txt
run: pip install -r ./image_search/requirements.txt

- name: Run isort
run: isort --check-only --profile=black ./image-search-engine/.
run: isort --check-only --profile=black ./image_search/.

- name: Run black
run: black --check ./image-search-engine/.
run: black --check ./image_search/.

- name: Run flake8
run: flake8 --ignore=E501,W503,F401 ./image-search-engine
run: flake8 --ignore=E501,W503,F401 ./image_search

# - name: Run Pylint
# run: pylint ./image-search-engine/*.py
# run: pylint ./image_search/*.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -44,9 +44,9 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./image-search-engine
context: ./image_search
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/image-search-engine:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/image_search:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -63,19 +63,19 @@ jobs:
cache: "pip"

- name: Install Dependencies
run: pip install -r ./text-search-engine/requirements.txt
run: pip install -r ./text_search/requirements.txt

- name: Run isort
run: isort --check-only ./text-search-engine/.
run: isort --check-only ./text_search/.

- name: Run black
run: black --check ./text-search-engine/.
run: black --check ./text_search/.

- name: Run flake8
run: flake8 --ignore=E501,W503,F401 ./text-search-engine
run: flake8 --ignore=E501,W503,F401 ./text_search

# - name: Run Pylint
# run: pylint ./image-search-engine/*.py
# run: pylint ./image_search/*.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -90,9 +90,9 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./text-search-engine
context: ./text_search
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/text-search-engine:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/text_search:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ architectures
*.csv
data.csv

image-search-engine/assets/uploaded_images/*
!image-search-engine/assets/uploaded_images/.gitkeep
image_search/assets/uploaded_images/*
!image_search/assets/uploaded_images/.gitkeep

# Logs
# image-search-engine/logs/*
# image_search/logs/*

# Jenkins
*/run_env
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: "^(helm-charts/.*)"
exclude: "^(helm_charts/.*)"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ A scalable search engine system supporting both image and text search capabiliti

- **Image Search Engine**: Search for similar images using deep learning embeddings

- [Detailed Documentation](./image-search-engine/README.md)
- [Detailed Documentation](./image_search/README.md)
- Vector similarity search using Qdrant
- Support for multiple image formats
- Real-time image processing and embedding generation
- Based on ResNet/EfficientNet architecture for feature extraction

- **Text Search Engine**: Advanced text search with Elasticsearch
- [Detailed Documentation](./text-search-engine/README.md)
- [Detailed Documentation](./text_search/README.md)
- Dual search capabilities:
- Autocomplete (Search-as-you-type) using Edge NGram Tokenizer
- Full-text search with fuzzy matching
Expand Down Expand Up @@ -136,7 +136,7 @@ A scalable search engine system supporting both image and text search capabiliti
- **Orchestration**:

- Kubernetes deployment
- [Helm Charts](./helm-charts/README.md) for package management
- [Helm Charts](./helm_charts/README.md) for package management
- Horizontal Pod Autoscaling
- Resource management and scaling

Expand Down
10 changes: 5 additions & 5 deletions assets/postman/search-engine.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"item": [
{
"name": "image-search-engine",
"name": "image_search",
"item": [
{
"name": "search-image-faiss",
Expand All @@ -21,7 +21,7 @@
{
"key": "file",
"type": "file",
"src": "/C:/Users/DELL/Desktop/search-engine-shopee/image-search-engine/assets/test_images/53.jpg"
"src": "/C:/Users/DELL/Desktop/search-engine-shopee/image_search/assets/test_images/53.jpg"
}
]
},
Expand Down Expand Up @@ -67,7 +67,7 @@
{
"key": "file",
"type": "file",
"src": "/C:/Users/DELL/Desktop/search-engine-shopee/image-search-engine/assets/test_images/53.jpg"
"src": "/C:/Users/DELL/Desktop/search-engine-shopee/image_search/assets/test_images/53.jpg"
}
]
},
Expand Down Expand Up @@ -104,7 +104,7 @@
]
},
{
"name": "text-search-engine",
"name": "text_search",
"item": [
{
"name": "full-text-search",
Expand Down Expand Up @@ -457,7 +457,7 @@
{
"key": "file",
"type": "file",
"src": "/C:/Users/DELL/Desktop/search-engine-shopee/image-search-engine/assets/test_images/53.jpg"
"src": "/C:/Users/DELL/Desktop/search-engine-shopee/image_search/assets/test_images/53.jpg"
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions backend/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ DATABASE_URL=postgresql+asyncpg://db_user:db_password@db_service/db_dev

ENVIRONMENT=LOCAL

TEXT_SEARCH_URL=http://text-search-engine:6000
IMAGE_SEARCH_URL=http://image-search-engine:7000
TEXT_SEARCH_URL=http://text_search:6000
IMAGE_SEARCH_URL=http://image_search:7000

POSTGRES_USER=db_user
POSTGRES_PASSWORD=db_password
Expand Down
16 changes: 8 additions & 8 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,34 @@ services:
elasticsearch:
condition: service_healthy

image-search-engine:
image_search:
container_name: image-search-container
image: vectornguyen76/image-search-engine
image: vectornguyen76/image_search
build:
context: ./image-search-engine
context: ./image_search
dockerfile: Dockerfile
environment:
- QDRANT_URL=http://qdrant_db:6334
- TRITON_SERVER_URL=triton_server:8001
ports:
- 7000:7000
volumes:
- ./image-search-engine/logs:/app/logs
- ./image_search/logs:/app/logs
depends_on:
- qdrant_db

text-search-engine:
text_search:
container_name: text-search-container
image: vectornguyen76/text-search-engine
image: vectornguyen76/text_search
build:
context: ./text-search-engine
context: ./text_search
dockerfile: Dockerfile
ports:
- 6000:6000
environment:
ELASTICSEARCH_HOST: http://elasticsearch:9200
volumes:
- ./text-search-engine/logs:/app/logs
- ./text_search/logs:/app/logs
depends_on:
elasticsearch:
condition: service_healthy
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 1

image:
repository: vectornguyen76/image-search-engine
repository: vectornguyen76/image_search
# Always and latest for dev, IfNotPresent for prod
pullPolicy: Always
tag: "latest"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6af8eb2

Please sign in to comment.