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
90 changes: 88 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ tower-http = { version = "0.5", features = ["cors"] }
tokio-cron-scheduler = "0.14.0"
chrono-tz = "0.10.4"
indexmap = "2.11.1"
async-trait = "0.1.89"
hex = "0.4.3"
futures = "0.3.31"
deadpool-redis = "0.22.0"
strsim = "0.11.1"
20 changes: 12 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
# -------- Stage 1: Build --------
FROM debian:bookworm as build-deps

RUN apt-get update && apt-get install -y curl build-essential pkg-config libssl-dev ca-certificates

# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
FROM rust:1.87 as build-deps

# Set working directory
WORKDIR /app

# Copy Cargo files and build dummy project to cache dependencies
COPY Cargo.toml Cargo.lock ./
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo build --release || true

# Copy the full source code
COPY . .

# Build the actual binary
RUN cargo build --release --bin bap-onest-lite

# -------- Stage 2: Runtime --------
FROM debian:bookworm-slim

# Install runtime dependencies
RUN apt-get update && apt-get install -y \
libpq5 \
libssl3 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy the built binary and config
COPY --from=build-deps /app/target/release/bap-onest-lite /app/bap-onest-lite
COPY config ./config

# Expose the port
EXPOSE 3008

CMD ["./bap-onest-lite"]
# Run the binary
CMD ["./bap-onest-lite"]
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,8 @@ cargo run -- config/local.yaml

Replace `config/local.yaml` with your configuration file as needed.

## Docker

Build and run the container manually:

```sh
docker build -t bap-onest-lite .
docker run -p 3008:3008 bap-onest-lite ./bap-onest-lite config/local.yaml
```

Or use Docker Compose for multi-service setup:
use Docker Compose for multi-service setup:

```sh
docker compose build --no-cache
Expand All @@ -57,4 +49,4 @@ You can update the config path as needed.

## Configuration

Configuration is loaded from the path you provide as the first argument.
Configuration is loaded from the path you provide as the first argument.
108 changes: 108 additions & 0 deletions config/match_score.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"match_score": [
{
"name": "role",
"profile_path": "/metadata/role",
"job_path": "/tags/role",
"weight": 2,
"is_array": false,
"match_mode": "embed",
"penalty": 0.6
},
{
"name": "industry",
"profile_path": "/metadata/industry",
"job_path": "/tags/industry",
"weight": 1,
"is_array": false,
"match_mode": "embed",
"penalty": 0.75
},
{
"name": "location",
"profile_path": "/metadata/whoIAm/locationData/city",
"job_path": "/tags/jobProviderLocation/city",
"weight": 1,
"is_array": false,
"match_mode": "embed",
"penalty": 0.95
},
{
"name": "iti_specialization",
"profile_path": "/metadata/whatIHave/itiSpecialization",
"job_path": "/tags/jobNeeds/educationSubsection/itiSpecialtyPreference",
"weight": 1,
"is_array": true,
"match_mode": "embed",
"penalty": 0.9
},
{
"name": "languages",
"profile_path": "/metadata/whatIHave/languagesKnown",
"job_path": "/tags/jobNeeds/languageSubsection/languageKnown",
"weight": 1,
"is_array": true,
"match_mode": "embed",
"penalty": 0.9
},
{
"name": "highest_qualification",
"profile_path": "/metadata/whatIHave/highestEducation",
"job_path": "/tags/jobNeeds/highestQualificationSubsection/highestQualification",
"weight": 1,
"is_array": true,
"match_mode": "embed",
"penalty": 0.9,
"bonus": 1.0,
"embedding_only": true
},
{
"name": "software_skills",
"profile_path": "/metadata/whatIHave/softwareSkills",
"job_path": "/tags/jobNeeds/highestQualificationSubsection/softwareKnowledgePreferred",
"weight": 1,
"is_array": true,
"match_mode": "embed",
"penalty": 0.9,
"bonus": 1.0,
"embedding_only": true
},
{
"name": "preferred_work_mode",
"profile_path": "/metadata/whatIWant/preferredWorkMode",
"job_path": "/tags/jobDetails/modeOfWork",
"weight": 1,
"is_array": true,
"match_mode": "embed",
"penalty": 0.7,
"embedding_only": true
},
{
"name": "age",
"profile_path": "/metadata/whoIAm/age",
"job_path_min": "/tags/jobNeeds/ageAllowedLowerLimit",
"job_path_max": "/tags/jobNeeds/ageAllowedUpperLimit",
"match_mode": "manual",
"penalty": 0.7,
"bonus": 1.05
},
{
"name": "monthly_in_hand",
"profile_path": "/metadata/whatIWant/monthlyInHandPreferred",
"job_path_min": "/tags/jobDetails/minMonthlyInHand",
"job_path_max": "/tags/jobDetails/maxMonthlyInHand",
"match_mode": "manual",
"penalty": 0.7,
"bonus": 1.05
},
{
"name": "work_hours_per_day",
"profile_path": "/metadata/whatIWant/workHoursPerDay",
"job_path_min": "/tags/jobDetails/workingHoursPerDay",
"job_path_max": "/tags/jobDetails/workingHoursPerDay",
"match_mode": "manual",
"penalty": 0.8,
"bonus": 1.05
}
]
}
Loading