Skip to content

Commit fbd96a8

Browse files
committed
feat: add Docker support and environment configuration for job scraping
1 parent 4ccd8ea commit fbd96a8

5 files changed

Lines changed: 54 additions & 1 deletion

File tree

.env.example

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Runtime
2+
NODE_ENV=production
3+
4+
# LinkedIn search filters
5+
SEARCH_LOCATION=Brasil
6+
SEARCH_GEO_ID=106057199
7+
SEARCH_LANGUAGE=pt
8+
REMOTE_ONLY=true
9+
JOB_TYPES=C,F
10+
SEARCH_KEYWORDS=UX Designer,UI Designer,Product Manager,Product Owner
11+
12+
# Scraping behavior
13+
WAIT_BETWEEN_SEARCHES_MS=5000
14+
PAGE_TIMEOUT_MS=10000
15+
MAX_PAGES_PER_KEYWORD=5
16+
17+
# Output files
18+
OUTPUT_FILE=output/vagas_linkedin.xlsx
19+
PDF_FILE=output/vagas_linkedin.pdf
20+
21+
# Legacy flags kept for compatibility
22+
HEADLESS=false
23+
VIEWPORT_WIDTH=1280
24+
VIEWPORT_HEIGHT=800

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:24-alpine
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm ci --omit=dev
7+
8+
COPY . .
9+
RUN mkdir -p /app/output
10+
11+
CMD ["node", "index.js"]

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
services:
2+
vagas-scraper:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
container_name: vagas-full
7+
env_file:
8+
- .env
9+
volumes:
10+
- ./output:/app/output
11+
restart: "no"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"dependencies": {
2929
"axios": "^1.13.6",
3030
"cheerio": "^1.2.0",
31+
"dotenv": "^17.3.1",
3132
"pdfkit": "^0.18.0",
3233
"xlsx": "^0.18.5"
3334
},

src/config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
const DEFAULT_KEYWORDS = [
2-
"
2+
"Java",
3+
"JavaScript",
4+
"React",
5+
"Node.js",
6+
"Mulesoft",
7+
"Desenvolvedor Junior",
8+
"Desenvolvedor Pleno",
39
];
410

511
function parseBoolean(value, fallback) {

0 commit comments

Comments
 (0)