File size: 926 Bytes
e1dcad5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM node:20-alpine

RUN apk add --no-cache git

# μž‘μ—… 디렉토리 생성
WORKDIR /app

RUN git clone --depth 1 https://github.com/tincansimagine/cursor-to-openai-nexus.git .

RUN mkdir -p logs data

# μ‹€ν–‰ κΆŒν•œ λΆ€μ—¬
RUN chmod +x src/proxy/cursor_proxy_server_linux_amd64

RUN cp .env.example .env

# μ˜μ‘΄μ„± μ„€μΉ˜ (ν”„λ‘œλ•μ…˜μš©μœΌλ‘œ devDependencies μ œμ™Έ)
RUN npm install --omit=dev

# μ• ν”Œλ¦¬μΌ€μ΄μ…˜ 파일 및 디렉토리 μ†Œμœ κΆŒμ„ node μ‚¬μš©μžλ‘œ λ³€κ²½
# npm install ν›„ μƒμ„±λœ node_modules 등도 ν¬ν•¨ν•˜κΈ° μœ„ν•΄ μ—¬κΈ°μ„œ chown μ‹€ν–‰
RUN chown -R node:node /app

# Node.js 일반 μ‚¬μš©μžλ‘œ μ‹€ν–‰ (λ³΄μ•ˆ κ°•ν™”)
USER node

# λ„€νŠΈμ›Œν¬ 포트 μ„€μ •
EXPOSE 3010

# κΈ°λ³Έ ν™˜κ²½λ³€μˆ˜ μ„€μ • (Hugging Face Secrets λ˜λŠ” docker run -e 둜 μ˜€λ²„λΌμ΄λ“œ κ°€λŠ₯)
ENV HOST=0.0.0.0
ENV PORT=3010
ENV LOG_LEVEL=INFO
ENV ENABLE_AUTO_REFRESH=false

# μ•± μ‹€ν–‰
CMD ["npm", "start"]