-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
62 lines (44 loc) · 1.3 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM python:3.11.9
# Set the working directory in the container
WORKDIR /app
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# True for development, False for production
ENV DEBUG True
ENV SECRET_KEY <STRONG_KEY_HERE>
#CELERY
ENV CELERY_BROKER redis://redis:6379/0
# Tasks
ENV DJANGO_SETTINGS_MODULE "core.settings"
COPY requirements.txt .
# Install required packages
RUN apt-get update && \
apt-get install -y \
build-essential \
wget \
gcc \
make && \
rm -rf /var/lib/apt/lists/*
# Download and install TA-Lib
RUN wget https://github.com/TA-Lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6.4-src.tar.gz && \
tar -xvf ta-lib-0.6.4-src.tar.gz && \
cd ta-lib-0.6.4 && \
./configure --prefix=/usr && \
make && \
make install && \
cd .. && \
rm -rf ta-lib-0.6.4 ta-lib-0.6.4-src.tar.gz
# Install the TA-Lib Python package
RUN pip install --no-cache-dir TA-Lib
# install python dependencies
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . .
# Manage Assets & DB
#RUN python manage.py collectstatic --no-input
#RUN python manage.py makemigrations
#RUN python manage.py migrate
# gunicorn
EXPOSE 5005
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.asgi:application"]