Update Dockerfile
Browse files- Dockerfile +6 -7
Dockerfile
CHANGED
@@ -6,24 +6,23 @@ RUN useradd -m -u 1000 user
|
|
6 |
USER user
|
7 |
|
8 |
ENV PATH="/home/user/.local/bin:$PATH"
|
9 |
-
ENV OCR_API_TOKEN=${OCR_API_TOKEN}
|
10 |
-
ENV GOOGLE_API_KEY=${GOOGLE_API_KEY}
|
11 |
-
ENV TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
|
12 |
-
ENV STATIC_ROOT=/app/staticfiles
|
13 |
|
14 |
# Set working directory
|
15 |
WORKDIR /app
|
16 |
|
17 |
# Clone GitHub repo into /app
|
18 |
-
# Replace with your repo URL
|
19 |
RUN git clone https://github.com/Mekhlafi98/solverai.git -b develop2 /app
|
20 |
|
21 |
# Install Python dependencies
|
22 |
-
# COPY --chown=user ./requirements.txt requirements.txt
|
23 |
-
#RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
24 |
RUN pip install --no-cache-dir --upgrade pip gunicorn && \
|
25 |
pip install --no-cache-dir -r requirements.txt
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
# Collect static files
|
29 |
RUN python manage.py collectstatic --noinput
|
|
|
6 |
USER user
|
7 |
|
8 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Set working directory
|
11 |
WORKDIR /app
|
12 |
|
13 |
# Clone GitHub repo into /app
|
|
|
14 |
RUN git clone https://github.com/Mekhlafi98/solverai.git -b develop2 /app
|
15 |
|
16 |
# Install Python dependencies
|
|
|
|
|
17 |
RUN pip install --no-cache-dir --upgrade pip gunicorn && \
|
18 |
pip install --no-cache-dir -r requirements.txt
|
19 |
|
20 |
+
# Set environment variables
|
21 |
+
ENV OCR_API_TOKEN=${OCR_API_TOKEN} \
|
22 |
+
GOOGLE_API_KEY=${GOOGLE_API_KEY} \
|
23 |
+
TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN} \
|
24 |
+
STATIC_ROOT=/app/staticfiles \
|
25 |
+
ALLOWED_HOSTS=localhost,127.0.0.1,azeez98-solveai.hf.space
|
26 |
|
27 |
# Collect static files
|
28 |
RUN python manage.py collectstatic --noinput
|