Initial commit setup with docker

This commit is contained in:
Mike
2023-07-13 16:53:03 +02:00
commit 427079a687
9 changed files with 550 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# Use an official Python runtime as the base image
FROM python:3.10
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file to the working directory
COPY app/requirements.txt .
# Copy the Tab-Lib dependencies to the working directory
COPY app/Tab-Lib-deps/ta-lib-0.4.0-src.tar.gz .
# Extract and install Tab-Lib
RUN tar -xzf ta-lib-0.4.0-src.tar.gz && \
rm ta-lib-0.4.0-src.tar.gz && \
cd ta-lib && \
./configure --prefix=/usr && \
make && \
make install && \
cd ..
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code to the container
COPY app/ .
# Run the bot script when the container launches
CMD [ "python", "bot.py" ]