-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
43 lines (33 loc) · 981 Bytes
/
Dockerfile
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
38
39
40
41
42
43
FROM --platform=linux/amd64 python:3.11.4-slim-bookworm
WORKDIR /app
# 필요한 시스템 패키지 설치 (libgomp 포함)
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc libpq-dev libatlas-base-dev libgomp1 && \
pip install --no-cache-dir pipenv
COPY Pipfile Pipfile.lock ./
RUN pipenv install --deploy --ignore-pipfile
RUN apt-get purge -y --auto-remove gcc && \
rm -rf /var/lib/apt/lists/*
COPY ./entrypoint.sh ./entrypoint.sh
COPY ./app ./app
ENV PORT=8000
ARG DB_HOST
ARG DB_USER
ARG DB_PASSWORD
ARG DB_NAME
ARG DB_PORT
ARG OPENAI_API_KEY
ARG GOOGLE_CSE_ID
ARG GOOGLE_API_KEY
ARG USER_AGENT
ENV DB_HOST=${DB_HOST}
ENV DB_USER=${DB_USER}
ENV DB_PASSWORD=${DB_PASSWORD}
ENV DB_NAME=${DB_NAME}
ENV DB_PORT=${DB_PORT}
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
ENV GOOGLE_CSE_ID=${GOOGLE_CSE_ID}
ENV GOOGLE_API_KEY=${GOOGLE_API_KEY}
ENV USER_AGENT=${USER_AGENT}
RUN chmod +x ./entrypoint.sh
ENTRYPOINT ["/bin/sh", "-c", "./entrypoint.sh"]